On a very simple way, you can restrict by using if statement by crossing 
checking the count/length of the list, 
https://clojuredocs.org/clojure.core/if

On Tuesday, October 29, 2019 at 11:06:54 PM UTC, Laurens Van Houtven wrote:
>
> Hi,
>
> I'm trying to divide a list into 3 lists such that (= my-list (concat a b 
> c)). I guess you could say I'm writing concato :-)
>
> (l/run n
>   [a b c]
>   (l/fresh [A B] ;; uppercase are internal accumulators
>     (l/appendo a b A)
>     (l/appendo A c B)
>     (l/== B '(p q r s))))
>
> ... running this program with small n (let's say 5) works fine. Ask for 
> more answers than there are (e.g. 20) and it ostensibly runs forever.
>
> 1. Why?
> 2. How do I fix that? (I've tried reordering the goals.)
>
> thanks
> lvh
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/bb6c0a89-203a-4a4d-83ed-f0338a0c26cb%40googlegroups.com.

Reply via email to