SICP |
Nov. 16th, 2010|05:06 pm |
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. |
|