Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

post you are run length encoding in lisp

Name: Anonymous 2014-10-05 3:18

critique mine pl0x:

(defun rle (str) ;run length encoding
(let ((i 0) c count out)
(while (< i (length str))
(if (eq c (elt str i))
(setq count (1+ count))
(when c
(setq out (append out (list (cons c count)))))
(setq c (elt str i))
(setq count 1))
(setq i (1+ i)))
(when c (setq out (append out (list (cons c count)))))
out))

Name: Anonymous 2014-10-11 22:28

>>64
You must prefer Windows.
HALLOC memoryAllocator = CreateAllocator(hInstance, hWnd, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL, MAX_INT, 8, ALLOC_HEAP | ALLOC_SHARED, &cmdShow);
if(memoryAllocator == (void*)0) ExitProcess(NULL, NULL, NULL, 1);
HMEMORY mem = AllocateMemory(&memoryAllocator, hInstance, hWnd, 0, 9000, 4, 8, LITTLE_ENDIAN);
if(mem == NULL) ExitProcess(NULL, NULL, NULL, 1);

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List