Skip to content

fix for #40 - generalization of the 'deref' operator#133

Merged
lutzhamel merged 2 commits intodev-1.0.0from
issue-40
Feb 12, 2022
Merged

fix for #40 - generalization of the 'deref' operator#133
lutzhamel merged 2 commits intodev-1.0.0from
issue-40

Conversation

@lutzhamel
Copy link
Copy Markdown
Collaborator

This PR generalizes the 'deref' operator '*' so that it can be applied to any value producing expression, e.g.:

-- pattern as value
let *(pattern x) = 3.
assert (x == 3).

-- arbitrary value expressions can become patterns
let *(1+1) = 2.

-- function calls
function goo with none do return pattern x end
let *goo() = 3
assert (x==3).

Copy link
Copy Markdown
Collaborator

@olwmc olwmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!! Looks fantastic. Approved!!!!

@olwmc olwmc linked an issue Feb 11, 2022 that may be closed by this pull request
@lutzhamel lutzhamel merged commit 3b9de20 into dev-1.0.0 Feb 12, 2022
@olwmc olwmc deleted the issue-40 branch February 13, 2022 23:50
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.

patterns returned by functions used in pattern-matching contexts

2 participants