diff options
author | sterni <sternenseemann@systemli.org> | 2021-03-03T00·57+0100 |
---|---|---|
committer | sterni <sternenseemann@systemli.org> | 2021-03-05T11·07+0000 |
commit | 8ff14cacb69dce491c81a629595087525b455a3f (patch) | |
tree | a373d488737545f60824261af74f778b329b109c /users/sterni/nix/string/default.nix | |
parent | ed3fce2b19fa0d28054382093b019967a9a16177 (diff) |
feat(users/sterni/nix): move flow.match to string.match r/2266
After all it only matches strings. Change-Id: I3d2e5221ef43f692de69028e78ed98b6b11f82d1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2586 Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'users/sterni/nix/string/default.nix')
-rw-r--r-- | users/sterni/nix/string/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/users/sterni/nix/string/default.nix b/users/sterni/nix/string/default.nix index 782f86b7f79b..e2b27571c73f 100644 --- a/users/sterni/nix/string/default.nix +++ b/users/sterni/nix/string/default.nix @@ -55,6 +55,9 @@ let then s else pad { inherit char; "${side}" = diff; } s; + # pattern matching for strings only + match = val: matcher: matcher."${val}"; + in { inherit take @@ -67,5 +70,6 @@ in { fromChars pad fit + match ; } |