News for hackers. Stuff that matters.
Re:How I Program in 2024 by tmtvl on Monday August 05, 2024 @04:13AM (#41159090)
I quite like Lisp 'cause I can do silly things like:

  (defun sum-triplet? (list)
    (declare (type List list))
    (and (= (length list) 3)
         (destructuring-bind (a b c)
             list
           (and (numberp a)
                (numberp b)
                (numberp c)
                (= (+ a b) c)))))

  (deftype Sum-Triplet ()
    '(and List
          (satisfies sum-triplet?)))

There are no comments on this comment yet.