extend is destructive, so in place extending the list. if you do not want this use append
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
(define (down txt)
(replace {))+}
txt
(string ")" (char (+ 0x2080 (length $it)₄
0)₂
(define (up txt)
(replace {)[₂|₃|₄|₅|₆|₇|₈|₉]}
txt
(dup ")" (- (char ($it 1)₂ 0x2080)₂
2048)₂
(define (down-file file)
(write-file file
(down (read-file file)₄
(define (up-file file)
(write-file file
(up (read-file file)₄
(define (initial-clauses str)
(set 'start (array rows columns (map int (explode str))))
(for (row 0 (sub1 rows))
(for (col 0 (sub1 columns))
(when (> (start row col) 0)
(push (string (to-var row col (sub1 (start row col))) " 0")
problem)))))
(define (initial-clauses str)
(set 'start (array rows columns (map int (explode str)₄
(for (row 0 (sub1 rows)₂
(for (col 0 (sub1 columns)₂
(when (> (start row col) 0)
(push (string (to-var row col (sub1 (start row col)₃ " 0")
problem)₅
(define (sublisp txt)
(set 'offset 0x2080)
(for (x 9 2 -1)
(replace (dup ")" x)
txt
(string ")" (char (+ offset x)₅
(print (string txt)₂
nil)
Quote
The Java based GUI server shipped until newLISP v.10.7.3:http://newlisp.org/code/guiserver-1.67.tgz"> . It contains an editor and demo files showing how to write graphics programs using guiserver.lsp and guiserver.jar.//http://newlisp.org/code/guiserver-1.67.tgz
(map (fn(x) (itunes-data (chop x))) (ref-all "Brian Eno" itunes-data))
> (set 'places '(0 0 0))
(0 0 0)
> (inc (places 1))
1
> places
(0 1 0)
>
(define (find-number lst)
(define Myhash:Myhash) ; hash table creation, O(1) lookup time
(set ' total 0)
(dolist (n lst)
(if (Myhash n)
(dec total n) ; decrease when already added before
(begin
(Myhash n true)
(inc total n)))) ; if not in hash table increase
(delete 'Myhash) ; first to delete contents and namespace
(delete 'Myhash) ; second to delete symbol
total)
(find-number '(1 2 3 4 5 3 2 1 5))
-> 4