func
func copied to clipboard
Apply and compose functions in Prolog
OCaml includes the reverse function operator (`|>`) which I've often found more readable than function composition + application. Have you consider adding such operator to func?
Expanding a function inside the goal argument of these predicates should keep the entire expansion inside the predicate. Currently it moves the expansion outside the predicate.
This issue collects all problems encountered when running on SWI-Prolog version 6. Unless V7 becomes the stable branch pretty soon, it would be good to fix this: - [ ]...
Teach library(func) how to compile a predicate defined using lambda syntax and assigned to a variable. Like, ``` prolog F = \X^Y^foo(stuff,Y,X), ... % becomes F = func:'5ecbc7c6883139e60b5db16550e8b5fc5da0244a', ... func:'5ecbc7c6883139e60b5db16550e8b5fc5da0244a'(X,Y)...
Should there be syntax for describing the input to a function? Perhaps `^`: ``` prolog ?- Q = queue_cons(^,item) $ queue_new. Q = [item]. ``` This suggests that `length $...
Ciao (with `:=`) and GRIPS (with `
[GRIPS](http://www.j-paine.org/grips.html) is another functional sugar for Prolog. Implement ideas from it, if they seem worthwhile: - [ ] `
`library(record)` supports terms with named arguments. Allow one to use a record as a function mapping an argument name to its value. Like this ``` prolog write(Person$name). ``` Which expands...