package sexp
S-expression swiss knife
Install
Dune Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=c0ad559a13c4eed11f25446016fc776ea147527d186d5b713fcc8d201d26ce6b
doc/src/sexp.sexp_app/csv_file.ml.html
Source file csv_file.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
(** CSV files *) open Core type t = Csv_record.t Lazy_list.t let test_length ~found ~expected = if found <> expected then failwithf "length mismatch: expected %i but found %i" expected found () ;; let read lexbuf = Lazy_list.build ~seed:None ~f:(fun len_opt -> match Csv_record.read lexbuf with | None -> None | Some record -> let found = List.length record in (match len_opt with | None -> Some (record, Some found) | Some expected -> test_length ~found ~expected; Some (record, len_opt))) ;; let write ?(sep = ',') out t = let length = ref None in Lazy_list.iter t ~f:(fun record -> let found = List.length record in (match !length with | None -> length := Some found | Some expected -> test_length ~found ~expected); Csv_record.write out record ~sep) ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>