We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
alexandria:curry
alexandria:rcurry
Eval this in REPL:
(ql:quickload :alexandria) (compile (defun next (predicate generator) (multiple-value-bind (value present-p) (funcall generator) (loop :until (funcall predicate value) :do (setf (values value present-p) (funcall generator))) (values value present-p)))) (next (alexandria:rcurry #'>= 3) (let ((i 0)) (lambda () (if (<= (incf i) 5) (values i t) (values nil nil)))))
which is expected to output 3, T, but on ABCL it will cause:
3, T
The value T is not of type REAL. [Condition of type TYPE-ERROR] Restarts: 0: [RETRY] Retry SLY interactive evaluation request. 1: [*ABORT] Return to SLY's top level. 2: [ABORT] Abort thread. Backtrace: 0: (INVOKE-DEBUGGER #<TYPE-ERROR {24998C06}>) 1: org.armedbear.lisp.Lisp.error(Lisp.java:383) 2: org.armedbear.lisp.Lisp.type_error(Lisp.java:457) 3: (#<LOCAL-FUNCTION IN RCURRY {2A5E76E5}> 2) 4: (NEXT #<LOCAL-FUNCTION IN RCURRY {2A5E76E5}> #<ANONYMOUS-INTERPRETED-FUNCTION {2E61E776}>) 5: (SYSTEM::%EVAL (NEXT (ALEXANDRIA:RCURRY #'>= 3) ..)) 6: (EVAL (NEXT (ALEXANDRIA:RCURRY #'>= 3) ..)) 7: (#<LOCAL-FUNCTION IN INTERACTIVE-EVAL {6B637CDE}>)
This error will not occur if:
next
(alexandria:rcurry #'>= 3)
(lambda (x) (>= x 3))
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Eval this in REPL:
which is expected to output
3, T
, but on ABCL it will cause:This error will not occur if:
next
function without compiling it.(alexandria:rcurry #'>= 3)
with(lambda (x) (>= x 3))
.The text was updated successfully, but these errors were encountered: