guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

schelog repl.


From: Stefan Israelsson Tampe
Subject: schelog repl.
Date: Tue, 14 Dec 2010 23:03:36 +0100
User-agent: KMail/1.13.5 (Linux/2.6.34.7-0.5-desktop; KDE/4.4.4; x86_64; ; )

Hi everybody.

I'm just so satisfied with the progress that I just need to write this email
to cool down a little and so that you don't need to comment on the glitches
present before :-) 


So, here is a script of a session,
nomenclature:
(<exec> (v ...) code ...)   - binds initiates global schelog variables v ...
                              and then execute the schelog code 'code ...'

(<n> var n)                 - tries to bind schelog var to 1 ... n
(<take> n code)             - finds the n next solutions values of code
                              in a tree search.

here is an interaction:
scheme@(guile-user)> (<exec> (a b))
scheme@(guile-user) [1]> (<exec> () (<n> a 10))
scheme@(guile-user) [2]> (<exec> () (<n> b 10))
scheme@(guile-user) [3]> (<take> 10 `(,(! a) ,(! b)))
$1 = ((1 1) (1 2) (1 3) (1 4) (1 5) (1 6) (1 7) (1 8) (1 9) (1 10))
scheme@(guile-user) [3]> 
scheme@(guile-user) [2]> (<take> 2 `(,(! a) ,(! b)))
$2 = ((2 <gp>) (3 <gp>))
scheme@(guile-user) [2]> (<take> 2 `(,(! a) ,(! b)))
$3 = ((4 <gp>) (5 <gp>))
scheme@(guile-user) [2]> (<exec> () (<n> b 5))
scheme@(guile-user) [3]> (<take> 20 `(,(! a) ,(! b)))
$4 = ((6 1) (6 2) (6 3) (6 4) (6 5) (7 1) (7 2) (7 3) (7 4) (7 5) (8 1) (8 2) 
(8 3) (8 4) (8 5) (9 1) (9 2) (9 3) (9 4) (9 5))
scheme@(guile-user) [3]> (<take> 20 `(,(! a) ,(! b)))
$5 = ((10 1) (10 2) (10 3) (10 4) (10 5))
scheme@(guile-user)>

Pretty nice!

Yes, is it okey to call these macros a schelog system or are that assuming a 
special syntax that lead to problems. Maybe guile-log  is better :-).

Cheers
Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]