Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re: Wish for option iterators #3779

Closed
vicuna opened this issue Sep 21, 2002 · 1 comment
Closed

Re: Wish for option iterators #3779

vicuna opened this issue Sep 21, 2002 · 1 comment

Comments

@vicuna
Copy link

vicuna commented Sep 21, 2002

Original bug ID: 1402
Reporter: administrator
Status: closed
Resolution: won't fix
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Alessandro Baretta wrote:

Hello!

Ooops! Mistake...

Here's the correct code.

let rec iter2opt (f:'a option -> 'b option -> unit) l1 l2 =
match l1, l2 with
| [], [] -> ()
| h1 :: t1, [] -> f (Some h1) None; iter2opt f t1 []
| [], h2 :: t2 -> f None (Some h2); iter2opt f [] t2
| h1 :: t1, h2 :: t2 -> f (Some h1) (Some h2); iter2opt f t1 t2

Alex

@vicuna
Copy link
Author

vicuna commented Apr 18, 2004

Comment author: administrator

See #3762

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant