File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1+ import argv
2+ import gleam/io
3+ import gleam/list
4+ import gleam/string
5+
6+ pub fn main ( ) {
7+ case argv . load ( ) . arguments {
8+ [ _ , .. ] ->
9+ argv . load ( ) . arguments
10+ |> list . permutations
11+ |> list . map ( fn ( words ) { string . join ( words , "\t " ) } )
12+ |> list . each ( io . println )
13+ _ -> panic as "ERROR: There must be at least 1 argument."
14+ }
15+ }
Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ gleam run -m clockhands |
2525gleam run - m factorial &&
2626gleam run - m generics &&
2727gleam run - m hello &&
28+ gleam run - m permutations I like carrots |
29+ Compare-Object (Get-Content " $PSScriptRoot \..\test\carrots_expected" ) |
30+ Assert-MatchTests &&
2831gleam run - m pipelines &&
2932gleam run - m sum_of_even_squares &&
3033gleam run - m triple_pipelines |
You can’t perform that action at this time.
0 commit comments