iamevn
Joined 5 years ago
Karma
647
Submissions
287
Member since
Jan 23
Joined 5 years ago
The newer Pebbles do have a better battery life, lasting multiple weeks maybe thanks of better battery tech.
either some-condition { print "was true" } { print "was false" }(the final filter sums k elements nCr(n, k) times as well)
separator = ','
quote = '"'
quoted_quote = '""'
newline = '\n'
plain_field = sequence(char_except(either(separator, quote, newline)))
quoted_field = quote + sequence(either(char_except(quote), quoted_quote)) + quote
field = either(quoted_field, plain_field)
row = sequence_with_separator(field, separator)
csv = sequence_with_separator(row, newline)
Seems fairly natural to me, although I'll readily admit I haven't had to write a CSV parser before so I'm surely glossing over some detail.