mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
Correctly introduce new recursion variables at the correct rank
This commit is contained in:
parent
7beee4e1f3
commit
5ec2715820
4 changed files with 56 additions and 12 deletions
|
@ -0,0 +1,10 @@
|
|||
app "test" provides [main] to "./platform"
|
||||
|
||||
main = isCorrectOrder (IsList [IsStr ""])
|
||||
# ^^^^^^^^^^^^^^ [IsList (List [IsList (List a), IsStr Str]), IsStr Str] -[[isCorrectOrder(1)]]-> Bool
|
||||
|
||||
isCorrectOrder = \pair ->
|
||||
#^^^^^^^^^^^^^^{-1} [IsList (List [IsList (List a), IsStr *]), IsStr *] -[[isCorrectOrder(1)]]-> Bool
|
||||
when pair is
|
||||
IsList l -> List.all l isCorrectOrder
|
||||
IsStr _ -> isCorrectOrder (IsList [pair])
|
Loading…
Add table
Add a link
Reference in a new issue