Skip to content
Permalink
Browse files

univals() is the same on all backends but the jvm

  • Loading branch information...
lizmat committed Jan 5, 2019
1 parent 27332f0 commit 485dec4df7bbb7367fd680e5782d3b18c93338e2
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/core/Cool.pm6
@@ -389,9 +389,6 @@ multi sub unimatch(|) { die 'unimatch NYI on jvm backend' }
#?endif

#?if js
proto sub univals(|) {*}
multi sub univals(Str:D $str) { $str.ords.map: { unival($_) } }

multi sub uniprop(|) { die 'uniprop NYI on js backend' }
multi sub uniprop-int(|) { die 'uniprop-int NYI on js backend' }
multi sub uniprop-bool(|) { die 'uniprop-bool NYI on js backend' }
@@ -406,6 +403,9 @@ multi sub unimatch(|) { die 'unimatch NYI on js backend' }
proto sub unival($, *%) {*}
multi sub unival(Str:D $str) { $str ?? $str.ord.unival !! Nil }
multi sub unival(Int:D $code) { $code.unival }

proto sub univals($, *%) {*}
multi sub univals(Str:D $str) { $str.ords.map: { .unival } }
#?endif

#?if moar
@@ -543,9 +543,6 @@ multi sub uniprops(Str:D $str, Stringy:D $propname = "General_Category") {
$str.ords.map: { uniprop($_, $propname) }
}

proto sub univals($, *%) {*}
multi sub univals(Str:D $str) { $str.ords.map: { .unival } }

proto sub unimatch($, |) {*}
multi sub unimatch(Str:D $str, |c) { $str ?? unimatch($str.ord, |c) !! Nil }
# This multi below can be removed when MoarVM bug #448 is fixed

0 comments on commit 485dec4

Please sign in to comment.
You can’t perform that action at this time.