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

Amb #40

Merged
merged 3 commits into from
Aug 10, 2021
Merged

Amb #40

merged 3 commits into from
Aug 10, 2021

Conversation

jcubic
Copy link
Contributor

@jcubic jcubic commented Aug 9, 2021

Amb operator using syntax-rules based on Nils M. Holm code #34

@jcubic
Copy link
Contributor Author

jcubic commented Aug 9, 2021

@lassik I was not sure about the name of the files and titles. Maybe you have an idea how to name them.

@lassik
Copy link
Member

lassik commented Aug 9, 2021

Thanks for preparing this!

exists? could be called find-stride. It finds a "stride" of adjacent elements satisfying p across many lists. We could think of it as searching for a column across a matrix, but a matrix has the same number of elements in each column, whereas this procedure can handle a different number of elements.

The procedure doesn't always return a boolean (#t/#f), rather it returns the return value of p. Hence find is a more precise name than exists?.

I'd suggest the following renames:

exists? -> find-stride
find-if-element-exists-in-list.md -> find-stride-across-lists.md
# Test whether a given property exists in a sequence of N lists -> Find stride across lists
amb.md -> nondeterminism-using-amb.md
# Nondeterminism using amb

@lassik
Copy link
Member

lassik commented Aug 10, 2021

It's been more than a day, so I'll merge this. We can always make new commits if you want to edit things later.

@lassik lassik merged commit 746b63f into master Aug 10, 2021
@lassik lassik deleted the amb branch August 10, 2021 10:48
@jcubic
Copy link
Contributor Author

jcubic commented Aug 10, 2021

@lassik thanks for updating the files.

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

Successfully merging this pull request may close these issues.

2 participants