dharmik, 4 months ago Even-odd function in lisp to make your day.
Even-odd function in lisp to make your day.
dharmik, 4 months ago Trying things I've done for Java in my class is more fun in Lisp.
Trying things I've done for Java in my class is more fun in Lisp.
dharmik, 4 months ago Swapping using a temporary variable in Lisp.
Swapping using a temporary variable in Lisp.
screwtape, 3 months ago @dharmik pretty cool, do you mind if I think out loud about these examples on the #lispyGopher #climate tomorrow?
@dharmik pretty cool, do you mind if I think out loud about these examples on the #lispyGopher #climate tomorrow?
louis, 3 months ago @dharmik @screwtape If you don't mind, the more elegant form to swap values (without the need to create a tmp symbol) is parallel assignment: (psetq a1 a2 a2 a1) There is also psetf, in case you need that.
@dharmik @screwtape
If you don't mind, the more elegant form to swap values (without the need to create a tmp symbol) is parallel assignment:
(psetq a1 a2 a2 a1)
There is also psetf, in case you need that.
zyd, 3 months ago @louis @dharmik @screwtape rotatef is also fun. As a verbose example: (defvar a 'a-value)<br></br>(defvar b 'b-value)<br></br>(rotatef a b)<br></br>
@louis @dharmik @screwtape
rotatef is also fun.
rotatef
As a verbose example:
(defvar a 'a-value)<br></br>(defvar b 'b-value)<br></br>(rotatef a b)<br></br>
Add comment