Pattern guards #232

Closed
opened 2020-02-20 23:17:11 +09:00 by zxq9 · 0 comments
zxq9 commented 2020-02-20 23:17:11 +09:00 (Migrated from gitlab.com)

Created by: radrow

Sometimes it is nice to be able to provide some assertions on patterns, for instance:

function f(l) = switch(l)
  k::_ | k < 0 => k
  _::t         => f(t)
  []           => 0

Expressions in the guard must not be stateful

*Created by: radrow* Sometimes it is nice to be able to provide some assertions on patterns, for instance: ``` function f(l) = switch(l) k::_ | k < 0 => k _::t => f(t) [] => 0 ``` Expressions in the guard must not be stateful
Sign in to join this conversation.
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QPQ-AG/sophia#232
No description provided.