picolisp

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/picolisp.git/
Log | Files | Refs | README | LICENSE

commit 99233ce522a02d1d8eeb4d7e4bf91ab01ce4c811
parent 7ad08ea00ad706f4a237ff210faa9b62cff2d252
Author: Alexander Burger <abu@software-lab.de>
Date:   Sun, 11 Nov 2012 13:17:22 +0100

Moved 'depth' definition
Diffstat:
Mersatz/lib.l | 30+++++++++++++++---------------
Mlib/debug.l | 16+---------------
Mlib/misc.l | 16+++++++++++++++-
3 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/ersatz/lib.l b/ersatz/lib.l @@ -1,4 +1,4 @@ -# 16jul12abu +# 11nov12abu # (c) Software Lab. Alexander Burger (setq *OS (java (java "java.lang.System" "getProperty" "os.name"))) @@ -565,6 +565,20 @@ (recurse "Lst" (dec "N")) (recurse (cdr "L") (- "Len" "N")) ) ) ) ) ) +(de depth (Idx) #> (max . average) + (let (C 0 D 0 N 0) + (cons + (recur (Idx N) + (ifn Idx + 0 + (inc 'C) + (inc 'D (inc 'N)) + (inc + (max + (recurse (cadr Idx) N) + (recurse (cddr Idx) N) ) ) ) ) + (or (=0 C) (*/ D C)) ) ) ) + ### Allow ### (de allowed Lst (setq *Allow (cons NIL (car Lst))) @@ -1352,20 +1366,6 @@ (T (line) T) ("Fun" (pop '"M")) ) ) ) -(de depth (Idx) #> (max . average) - (let (C 0 D 0 N 0) - (cons - (recur (Idx N) - (ifn Idx - 0 - (inc 'C) - (inc 'D (inc 'N)) - (inc - (max - (recurse (cadr Idx) N) - (recurse (cddr Idx) N) ) ) ) ) - (or (=0 C) (*/ D C)) ) ) ) - (de what (S) (let *Dbg NIL (setq S (chop S)) diff --git a/lib/debug.l b/lib/debug.l @@ -1,4 +1,4 @@ -# 14jul12abu +# 11nov12abu # (c) Software Lab. Alexander Burger # Prompt @@ -40,20 +40,6 @@ (T (line) T) ("Fun" (pop '"M")) ) ) ) -(de depth (Idx) #> (max . average) - (let (C 0 D 0 N 0) - (cons - (recur (Idx N) - (ifn Idx - 0 - (inc 'C) - (inc 'D (inc 'N)) - (inc - (max - (recurse (cadr Idx) N) - (recurse (cddr Idx) N) ) ) ) ) - (or (=0 C) (*/ D C)) ) ) ) - (de what (S) (let *Dbg NIL (setq S (chop S)) diff --git a/lib/misc.l b/lib/misc.l @@ -1,4 +1,4 @@ -# 07jul12abu +# 11nov12abu # (c) Software Lab. Alexander Burger # *Allow *Tmp @@ -196,6 +196,20 @@ (recurse "Lst" (dec "N")) (recurse (cdr "L") (- "Len" "N")) ) ) ) ) ) +(de depth (Idx) #> (max . average) + (let (C 0 D 0 N 0) + (cons + (recur (Idx N) + (ifn Idx + 0 + (inc 'C) + (inc 'D (inc 'N)) + (inc + (max + (recurse (cadr Idx) N) + (recurse (cddr Idx) N) ) ) ) ) + (or (=0 C) (*/ D C)) ) ) ) + ### Allow ### (de allowed Lst (setq *Allow (cons NIL (car Lst)))