Zulip Chat Archive
Stream: Is there code for X?
Topic: Concat as match pattern
Daniel Weber (Sep 01 2024 at 05:19):
Is there a way to use docs#SimpleGraph.Walk.concat as a match pattern, instead of cons?
Yaël Dillies (Sep 01 2024 at 06:20):
Do you mean [a] ++ p
, [a, b] ++ p
, etc..., rather than p ++ q
(where p
is a free variable)? For the former, the answer is yes and all you need to do is tag concat
with @[match_pattern]
. For the latter, the answer is no because p ++ q
doesn't reduce to a constructor application.
Last updated: May 02 2025 at 03:31 UTC