-
Notifications
You must be signed in to change notification settings - Fork 137
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add `-npartial' for arbitrary currying
Currently, we have `-partial' and `-rpartial' for currying with arguments at either the left or the right, but we don't have anything for truly arbitrary application of curried arguments. Therefore I've included `-npartial' to plug that gap. It takes an offset N to determine where to put the curried arguments, a function FN, and the curried ARGS. E.g.: (funcall (-npartial 1 (lambda (a b c) (+ a (* b c))) 5) 2 3) ;; => 17 (funcall (-npartial 2 (lambda (a b c d) (+ a (* b c) d)) 3) 2 4 5) ;; => 19 (Note that I have a slightly different version of texinfo -- 6 instead of 4 -- so the way that the paragraphs have been filled is slightly different, but I'm afraid there's nothing much I can do, because Arch can't downgrade all the way to 4.)
- Loading branch information
Showing
5 changed files
with
596 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.