Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,10 @@
|
|||
USING: csv io.encodings.utf8 kernel math.parser sequences ;
|
||||
IN: rosetta-code.csv-manipulation
|
||||
|
||||
: append-sum ( seq -- seq' )
|
||||
dup [ string>number ] map-sum number>string suffix ;
|
||||
|
||||
: csv-sums ( seq -- seq' )
|
||||
[ 0 = [ "SUM" suffix ] [ append-sum ] if ] map-index ;
|
||||
|
||||
"example.csv" utf8 [ file>csv csv-sums ] [ csv>file ] 2bi
|
||||
Loading…
Add table
Add a link
Reference in a new issue