chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] How to pass a list to amb?


From: Sascha Ziemann
Subject: [Chicken-users] How to pass a list to amb?
Date: Sun, 24 Aug 2014 21:48:31 +0200

I tried to pass a list to amb but I do not know how to use amb-thunks. I tried this:

(require-extension amb)

(let ((names '(a b c)))
  (amb-collect
   (let ((name (amb-thunks (map (lambda (x) x) names)))
         (value (amb 'c 'b 'a)))
     (amb-assert (eq? name value))
     value)))

(let ((names '(a b c)))
  (amb-collect
   (let ((name (amb-thunks names))
         (value (amb 'c 'b 'a)))
     (amb-assert (eq? name value))
     value)))

But both failes with:

Process scheme exited abnormally with code 139

This looks like a bug to me.

I have tested with 4.7.0 on Debian (Intel 32).

reply via email to

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