Code: Select all
; omit last chunk if too short
(explode '(a b c d e f g h) 2 true) → ((a b) (c d) (e f))
Code: Select all
; omit last chunk if too short
(explode '(a b c d e f g) 2 true) → ((a b) (c d) (e f))
Code: Select all
; omit last chunk if too short
(explode '(a b c d e f g h) 2 true) → ((a b) (c d) (e f))
Code: Select all
; omit last chunk if too short
(explode '(a b c d e f g) 2 true) → ((a b) (c d) (e f))
The xhtml parsing routine (per the post below) now fails...Lutz wrote:Thank you very much Johu, an updated revision 5 is online here:
http://www.newlisp.org/downloads/newlisp_manual.html
Code: Select all
(xml-error)
;-> ("closing tag doesn't match" 572782)
Code: Select all
tidy -utf8 -xml newlisp_manual.html > /dev/null
Code: Select all
An evaluated context (no quote) can be given as an argument:
> (context 'FOO)
FOO
FOO> (context MAIN)
MAIN
> (set 'old FOO)
FOO
> (context 'BAR)
BAR
BAR> (context MAIN:old)
FOO
FOO>
Code: Select all
Running above example produces the following output:
pid:53181->47 pid:53180->61 pid:53179->75 pid:53178->39 pid:53177->3
pid:53181->59 pid:53180->12 pid:53179->20 pid:53178->77 pid:53177->47
pid:53181->6 pid:53180->56 pid:53179->96 pid:53178->78 pid:53177->18
I think that this sentence means the following:For floating point values that evaluate to NaN (Not a Number), both +INF and -INF are treated as 0 (zero).
Code: Select all
> (sqrt -1)
nan
> (+ (sqrt -1))
0
> (mul 1e308 10)
inf
> (+ (mul 1e308 10))
9223372036854775807
> (mul -1e308 10)
-inf
> (+ (mul -1e308 10))
9223372036854775807
Code: Select all
newLISP v.10.2.1 on Win32 IPv4, execute 'newlisp -h' for more info.
> (set 'lst '(a b aVar c d))
(a b aVar c d)
> (delete 'aVar true)
true
> lst
(a b nil c d)
>
syntax: (find exp-key list [func-compare | int-regex-option])
Code: Select all
newLISP v.10.2.1 on Win32 IPv4, execute 'newlisp -h' for more info.
> (map (fn (x y z) (list $idx x y z)) '(a b c) '(1 2) '(A B C D E))
((0 a 1 A) (1 b 2 B) (2 c nil nil))
> (map list '(a b c) '(1 2) '(A B C D E))
((a 1 A) (b 2 B) (c))
>
Code: Select all
newLISP v.10.2.1 on Linux IPv4 UTF-8, execute 'newlisp -h' for more info.
> (parse-date "2007.1.3" "%Y.%m.%d")
1167782400
> (parse-date "January 10, 07" "%B %d, %y")
1168387200
> (parse-date "1970.1.1" "%Y.%m.%d")
0
> (parse-date "1900.1.1" "%Y.%m.%d")
2085892096
> (parse-date "1901.12.13" "%Y.%m.%d")
2147408896
> (parse-date "1901.12.14" "%Y.%m.%d")
-2147472000
> (parse-date "2038.1.19" "%Y.%m.%d")
2147472000
> (parse-date "2038.1.20" "%Y.%m.%d")
-2147408896
>
> (date-value 2106 2 6)
4294944000
> (date-value 2106 2 7)
63104
>