Pattern matching on string concatenation
Opened this issue · 2 comments
gregorybchris commented
get_match "bxyz"
. get_match =
| "a" ++ rest -> "A"
| "b" ++ rest -> "B"
| "c" ++ rest -> "C"
gregorybchris commented
Not 100% sure we want this, but we should have some way of implementing something like substring directly in Scrapscript. Pattern matching seems more idiomatic for Scrapscript than indexing directly into a string
tekknolagi commented
huh I kinda like this