@abrudz
well, you did read my floundering series earlier as well. I think your apl outer product contrasting lisp's mapcar is an instructive point.
@ksaj @praetor
Conversation
Notices
-
Embed this notice
screwlisp (screwtape@mastodon.sdf.org)'s status on Friday, 10-Jan-2025 05:51:27 JST screwlisp
-
Embed this notice
screwlisp (screwtape@mastodon.sdf.org)'s status on Friday, 10-Jan-2025 06:19:02 JST screwlisp
@praetor @abrudz @ksaj
I have a followup question which I don't already know the answer to: What does this look like in python and apl?
(defun piecemeal-maker-maker (&optional (initial-clauses nil))
(let ((alist initial-clauses))
(lambda (&key view set delete make)
(cond (view (copy-list alist))
(set (copy-list (push set alist)))
(delete (delete delete alist :key 'car :test 'equal))
(make (eval `(lambda (,@Make) (cond ,@alist))))))))er, it's self-documenting right?
-
Embed this notice
Ásbjørn 🏳️🌈 (praetor@social.sdf.org)'s status on Friday, 10-Jan-2025 06:19:03 JST Ásbjørn 🏳️🌈
@screwtape @abrudz @ksaj NixOS, Lisp, Scheme...and NOW APL? Y'all are gonna have to wait till I can get some Redbull into me to focus like that. #adhd
screwlisp repeated this. -
Embed this notice
screwlisp (screwtape@mastodon.sdf.org)'s status on Friday, 10-Jan-2025 06:19:50 JST screwlisp
eg.
* (piecemeal-maker-maker)
#<FUNCTION (LAMBDA (&KEY :VIEW :SET :DELETE :MAKE) :IN PIECEMEAL-MAKER-MAKER) {1002C1040B}>
* (funcall * :set '((zerop years) (* months 15/12)))
(((ZEROP YEARS) (* MONTHS 5/4)))
* (funcall ** :make '(years months))
#<FUNCTION (LAMBDA (YEARS MONTHS)) {535D0BEB}>
* (funcall * 0 4)
5
@praetor @abrudz @ksaj @Make
-
Embed this notice