package sexp
S-expression swiss knife
Install
Dune Dependency
Authors
Maintainers
Sources
sexp-v0.16.0.tar.gz
sha256=bde6acfd2814bcc38a0d3cacb42e513d8932595152dd9798419559fb0e026f4e
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)"
>