notation to mark function inputs?
Should there be syntax for describing the input to a function? Perhaps ^:
?- Q = queue_cons(^,item) $ queue_new.
Q = [item].
This suggests that length $ X is sugar for length(^,~) $ X. Is that the way to go?
This would allow us to compose (and apply) functions with greater flexibility since the argument order no longer matters:
SillyAtomCodes = atom_string(~,^) of string_codes(~,^).
It may be too hard to decipher. This could be a circumstance in which too much sugar rots our teeth.
Wouldn't look fancier the symbol '@' rather than '$'? It also sounds more like function 'at' some point in the input space, or in the case of list indexing:
N = 2, format('The number word is ~w~n', [zero,one,two,three] @ N).
Update: Certainly, the '@' symbol is way overused, it would be hard to correctly generate the appropriate transformations. It might be a rather bad idea to use it.
Wouldn't look fancier the symbol '@' rather than '$'?
I decided to use $ because that is the math operator for function application. It's also the operator that Haskell uses. It seemed better to follow those precedents than try another symbol.
Sure. And btw, what a great extension you've made here!