Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

loop macro with monadic operation #147

Closed
nyuichi opened this issue Jun 25, 2014 · 5 comments
Closed

loop macro with monadic operation #147

nyuichi opened this issue Jun 25, 2014 · 5 comments

Comments

@nyuichi
Copy link
Member

nyuichi commented Jun 25, 2014

https://gist.github.com/wasabiz/c15f947dc763cc479626#file-loop-scm

; loop macro with monadic operation

(loop
  (let ((a (pick '(1 2 3)))
        (b (pick '(4 5 6))))
    (+ a b)))

;=> (5 6 7 6 7 8 7 8 9)

[updates]

@nyuichi
Copy link
Member Author

nyuichi commented Jun 25, 2014

As a name 'loop' is often used for let-loop expression, we may call it iter or something instead.

@stibear
Copy link
Contributor

stibear commented Jun 25, 2014

Why don't you use srfi-42?

@nyuichi
Copy link
Member Author

nyuichi commented Jun 25, 2014

@stibear

As srfi-42 is made to become an enough powerful DSL to perform everything that you can do with plain functions and expressions, it contains a lot of things in itself. It's too complicated.

@nyuichi
Copy link
Member Author

nyuichi commented Jun 26, 2014

Because of dependency on (picrin control) library, we first make a system that provides a way to specify what are requisite libraries for each library. The merge will be late.

@nyuichi
Copy link
Member Author

nyuichi commented Jun 28, 2014

Closing as fixed. This suggestion is now a part of picrin scheme, as (picrin control list) library.

@nyuichi nyuichi closed this as completed Jun 28, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants