Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed the switch implementation in the standard library that was brea…

…king things.
  • Loading branch information...
commit fdf6adbef0950fc160f977be3ac3a22339563d50 1 parent 5d4c2cc
@TikhonJelvis authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  src/base/control.tpl
  2. +1 −1  src/base/string.tpl
View
2  src/base/control.tpl
@@ -12,7 +12,7 @@ $a -> $b := [$a, $b]
precedence (->) 11
switch value [case, rest...] := {
compare [condition, res] test := condition = test --> res
- compare case value | is rest --> switch value rest
+ compare case value | (is rest --> switch value rest)
}
cond [[condition, result], rest...] := condition ? result @ cond rest
View
2  src/base/string.tpl
@@ -11,7 +11,7 @@ str % vals := {
'%' -> {vals <- val:vals; '%'},
's' -> val,
'd' -> val * 1
- ] >< (is chars ? process chars vals @ '')
+ ] >< (is chars ? process chars vals @ '')
} else {
c1 >< (is c2 ? process (c2:chars) (val:vals) @ '')
}
Please sign in to comment.
Something went wrong with that request. Please try again.