@@ -1440,21 +1440,21 @@ if Version.match?(System.version(), ">= 1.17.0-dev") do
1440
1440
# collect the environment from the parameters
1441
1441
# parameters are always patterns
1442
1442
{ _ , state , penv } =
1443
- for p <- params , reduce: { nil , state , env } do
1443
+ for p <- List . wrap ( params ) , reduce: { nil , state , env } do
1444
1444
{ _ , state , penv } ->
1445
1445
expand_pattern ( p , state , penv )
1446
1446
end
1447
1447
1448
1448
# expand guards, which includes the env from params
1449
1449
{ _ , state , _ } =
1450
- for guard <- guards , reduce: { nil , state , penv } do
1450
+ for guard <- List . wrap ( guards ) , reduce: { nil , state , penv } do
1451
1451
{ _ , state , env } ->
1452
1452
expand ( guard , state , env )
1453
1453
end
1454
1454
1455
1455
# expand the blocks, there could be `:do`, `:after`, `:catch`, etc
1456
1456
{ blocks , state } =
1457
- for { type , block } <- blocks , reduce: { [ ] , state } do
1457
+ for { type , block } <- List . wrap ( blocks ) , reduce: { [ ] , state } do
1458
1458
{ acc , state } ->
1459
1459
{ res , state , _env } = expand ( block , state , penv )
1460
1460
{ [ { type , res } | acc ] , state }
0 commit comments