Paste number 49134: Currying Vs. Lambda

Paste number 49134: Currying Vs. Lambda
Pasted by: JohnnyL
When:1 year, 8 months ago
Share:Tweet this! | http://paste.lisp.org/+11WU
Channel:None
Paste contents:
Raw Source | XML | Display As
Can someone please give me an example of how to 
change this into a lambda based curry?

    (defun tier3(arg-itier2)
      (prog (print 'itier3) ('itier3)))

    (defun tier2 (arg-tier1)
      (prog (print 'itier2) ('itier2)))

    (defun tier1(arg-tier0)
      (prog (print 'itier1) ('itier1)))

    (defun itest(firstarg)

      (progn
             (setq tier0 (tier3
               (tier2
                 (tier1 firstarg)))) (tier0)))





SBCL
Break 7 [61]> (defun tier3(arg-itier2)
      (prog (print 'itier3) ('itier3)))

*** - SYSTEM::%EXPAND-FORM: 'ITIER3 should be a lambda expression
The following restarts are available:
ABORT          :R1      ABORT
ABORT          :R2      ABORT
ABORT          :R3      ABORT
ABORT          :R4      ABORT
ABORT          :R5      ABORT
ABORT          :R6      ABORT
ABORT          :R7      ABORT
ABORT          :R8      ABORT
    :R9      ABORT

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.