Skip to content

Commit d471090

Browse files
authored
Merge pull request #23 from cgay/n-spaces
util.dylan: n-spaces is just curry(pad, "")
2 parents 1126238 + e54915d commit d471090

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

command-interface/util.dylan

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,7 @@ define function or (a :: <boolean>, b :: <boolean>)
1313
a | b;
1414
end;
1515

16-
define function n-spaces (n :: <integer>)
17-
=> (spaces :: <string>);
18-
let str = "";
19-
for (i from 0 below n)
20-
str := add(str, ' ');
21-
end;
22-
str;
23-
end function;
16+
define constant n-spaces = curry(pad, "");
2417

2518
define function longest-common-prefix (strings :: <sequence>)
2619
=> (prefix :: <string>);

0 commit comments

Comments
 (0)