1
2
3
4
;; Turns a flat-list into a list of n-sized lists
;; Examples:
;;   (group-by '(1 2 3 4) 2) => ((1 2) (3 4))
...

Lisp Group-by

by omouse.vox.com, December 21, 2007 19:55, 1 refactoring, tagged with scheme, lists, flatlist, group

Tested on MzScheme

Avatar Talk
1
2
3
4
  ; 5*O(n)
  (defun next-lex (a)
    (let* ((r (reverse a))
...

Lisp Lexicographically next perm...

by Kartik Agaram, October 04, 2007 00:19, 8 refactorings

Given a list of numbers, ge...

14d99459914c594998d2506db1e868c2 Talk
1
2
3
4
(defun transpose (m)
       (cond
        ((null (car m)) nil)
...

Lisp matrix transpose

by mrsheep, October 03, 2007 11:12, 3 refactorings

simpler? shorter?

Avatar Talk
1
2
3
4
(defun header-encode (string)
  (if (find-if (lambda (c) (> (char-code c) 127)) string)
...

Lisp folding of non-ascii long h...

by luser.myopenid.com/, October 02, 2007 11:37, 2 refactorings

I would like to use header-...

Avatar Talk