improve eval time
This commit is contained in:
parent
9790098496
commit
bee760c3e6
1 changed files with 1 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
||||||
{ lib, ... }:
|
{ lib, ... }:
|
||||||
with lib;
|
with lib;
|
||||||
with builtins; rec {
|
with builtins; rec {
|
||||||
readLines = f: filter (s: (isString s) && s != "") (split "\n" (readFile f));
|
readLines = f: let lines = filter isString (split "\n" (readFile f)); in take ((length lines) - 1) lines;
|
||||||
splitWhitespace = s: filter isString (builtins.split "[[:space:]]+" s);
|
splitWhitespace = s: filter isString (builtins.split "[[:space:]]+" s);
|
||||||
abs = i: if i >= 0 then i else i * -1;
|
abs = i: if i >= 0 then i else i * -1;
|
||||||
delta = x: y: abs (x - y);
|
delta = x: y: abs (x - y);
|
||||||
|
|
Loading…
Reference in a new issue