HexstreamSoftProjectspositional-lambda → Examples

This is mostly just the examples on the main page with the actual macroexpansions instead of "what you'd write by hand".

This page is ugly and incomplete. Writing HTML and CSS by hand is too depressing. I'll make a great documentation system and update my old HTML and CSS libraries and then come back to this... Thank you for your patience!

plambdaMacroexpansion
(plambda (values :3 :1))
(LAMBDA (#:USED1-992 #:IGNORED2-993 #:USED3-991)
  (DECLARE (IGNORE #:IGNORED2-993))
  (VALUES #:USED3-991 #:USED1-992))
(plambda (list* :2 :1 :rest))
(LAMBDA (#:USED1-995 #:USED2-994 &REST #:USED-REST-996)
  (LIST* #:USED2-994 #:USED1-995 #:USED-REST-996))
(plambda :rest (list :2 :1))
(LAMBDA (#:USED1-998 #:USED2-997 &REST #:IGNORED-REST-999)
  (DECLARE (IGNORE #:IGNORED-REST-999))
  (LIST #:USED2-997 #:USED1-998))
(plambda :3 :2)
(LAMBDA (#:IGNORED1-1001 #:USED2-1000 #:IGNORED3-1002)
  (DECLARE (IGNORE #:IGNORED1-1001 #:IGNORED3-1002))
  #:USED2-1000)
(plambda :3 (mapcar :1 :rest))
(LAMBDA (#:USED1-1003 #:IGNORED2-1005 #:IGNORED3-1006 &REST #:USED-REST-1004)
  (DECLARE (IGNORE #:IGNORED2-1005 #:IGNORED3-1006))
  (MAPCAR #:USED1-1003 #:USED-REST-1004))
(plambda :2)
(LAMBDA (#:IGNORED1-1008 #:USED2-1007)
  (DECLARE (IGNORE #:IGNORED1-1008))
  #:USED2-1007)
(plambda (print :1) :2)
(LAMBDA (#:USED1-1009 #:USED2-1010) (PRINT #:USED1-1009) #:USED2-1010)
(plambda :2 (list :1 (:let (random))))
(LET ((#:PRECOMPUTED1-1012 (RANDOM)))
  (LAMBDA (#:USED1-1011 #:IGNORED2-1013)
    (DECLARE (IGNORE #:IGNORED2-1013))
    (LIST #:USED1-1011 #:PRECOMPUTED1-1012)))
(plambda (write :1 :base (:cache *print-base*)))
(LET ((#:CACHE1-1015 NIL) (#:CACHEDP1-1016 NIL))
  (LAMBDA (#:USED1-1014)
    (WRITE #:USED1-1014 :BASE
           (IF #:CACHEDP1-1016
               #:CACHE1-1015
               (PROG1 (SETF #:CACHE1-1015 *PRINT-BASE*)
                 (SETF #:CACHEDP1-1016 T))))))