Grain of Salt - SICP [entries|archive|friends|userinfo]
snauts

[ userinfo | sc userinfo ]
[ archive | journal archive ]

SICP [Nov. 16th, 2010|05:06 pm]
Previous Entry Add to Memories Tell A Friend Next Entry
Vispār es biju redzējis, ka prologā var visādas perversijas, tur tipo:
> (append (a b) (c d) ?x)
?x = (a b c d)

> (append ?x (c d) (a b c d))
?x = (a b)

> (append (a b) ?x (a b c d))
?x = (c d)

vai:
> (append ?x ?y (a b c d))
?x = (), ?y = (a b c d)
?x = (a), ?y = (b c d)
?x = (a b), ?y = (c d)
?x = (a b c), ?y = (d)
?x = (a b c d), ?y = ()

bet tas ko es ieraudzīju SICPā ka tur var rakstīt:
> (?x (a b) (c d) (a b c d))
?x = append

mani vienkārši satrieca.
linkpost comment

Comments:
[User Picture]
From:[info]pljecka
Date:November 16th, 2010 - 05:21 pm
(Link)
[User Picture]
From:[info]barvins
Date:November 16th, 2010 - 11:28 pm
(Link)
Hehe, labs:)