Skip to content

Best way to collapse nested language #260

Answered by mwillsey
genos asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there!

Yes, that is definitely one of the downsides of the variadic patterns: you can't write a pattern than captures all of them. You could maybe try refactoring to a sort of "cons list" approach, but I'm not sure if that would work in your domain. I think you could definitely do it in an analysis. I wouldn't fear cloning tooooo much, after all, you have to materialize the list somewhere. Perhaps a clever use of Rc or something a persistent vector could help.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@genos
Comment options

@mwillsey
Comment options

@genos
Comment options

Answer selected by genos
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants