Skip to content

Commit

Permalink
Create csv.lm
Browse files Browse the repository at this point in the history
  • Loading branch information
KajizukaTaichi committed Jan 10, 2025
1 parent 30c3e8d commit 0c9c037
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions example/tools/csv.lm
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load std;

let trim = \x.filter(\x.(x != ""), x);
let csvParse = fn(x ->
let line = trim(x / "\n");
(map \x.trim(x / ",") line)
);

print csvParse "
A, B, C
1, 2, 3
";

0 comments on commit 0c9c037

Please sign in to comment.