source: Deliverables/D4.1/Util.ml @ 131

Last change on this file since 131 was 131, checked in by mulligan, 10 years ago

Changes from this morning: checking checksum is correct for a
intel_hex_entry. Also some new useful functions in Util and elsewhere.

File size: 293 bytes
Line 
1let ($) f x = f x
2;;
3
4let (<*>) f g x = f (g x)
5;;
6
7let flip f a b = f b a
8;;
9
10let char_list_of_string s =
11  let str_length = String.length s in
12  let rec aux s l buff =
13    if l = str_length then
14      buff
15    else
16      aux s (l + 1) ((String.get s l)::buff)
17  in
18    List.rev $ aux s 0 []
Note: See TracBrowser for help on using the repository browser.