Search
Thursday, 11th of April 2019, 16:54:17 UTC
18:21:59
moldybits
does this function have a name, and does it exist? (f '(1 2 3)) => ((1 2) (2 3) (3 1))
18:30:03
Bike
you're collecting all the length 2 combinations
18:30:31
Bike
(let ((c nil)) (alexandria:map-combinations (lambda (x) (push x c)) '(1 2 3) :length 2) c)
18:32:34
pjb
Perhaps he's collecting successive pairs cycling back. (defun f (list) (loop for (a b) on list collect (list a (or b (first list))))) (f '(1 2 3)) #| --> ((1 2) (2 3) (3 1)) |#
18:37:41
moldybits
right, that's kinda obvious now that i see it. :)
18:38:13
moldybits
thanks, pjb and Bike.
19:14:50
sjl_
(defun f (list) (loop for (a . b) on list collect (list a (if b (car b) (first list)))))
19:25:29
warweasle
I never thought about it, but common lisp can use recursive macros, right?
19:29:07
flip214
warweasle: as long as you have some termination condition that triggers before the compiler stack is full...
19:29:26
warweasle
Ok. Then my mistake is somewhere else.
19:31:51
flip214
warweasle: care to paste?
19:32:41
warweasle
flip214: No, I moved everything into two functions just in case.
19:33:14
warweasle
I'll be happy to share when I'm done. It's for the lisp jam...It take a dialogue tree and executes it.
22:03:49
gjvc
does anyone have any suggestions on getting SLIME working on Fedora 30 ? it can't find swank-loader.lisp
23:10:38
Xach
gjvc: how did you install slime?
23:43:46
gjvc
i think it's there via rpm
23:44:24
gjvc
emacs-slime-2.19-4.fc29.noarch
23:49:59
gjvc
* (ql:quickload "quicklisp-slime-helper")
0:58:22
Lord_of_Life_
** NICK Lord_of_Life
2:55:57
beach
Good morning everyone!
Friday, 12th of April 2019, 4:54:17 UTC