search for: noteskey

Displaying 3 results from an estimated 3 matches for "noteskey".

2014 Jan 30
2
[PATCH] builder: output translated notes
...old_left ( + fun acc lang -> + match List.filter ( + fun (langkey, _) -> + match langkey with + | "C" -> lang = "" + | langkey -> langkey = lang + ) notes with + | (_, noteskey) :: _ -> noteskey :: acc + | [] -> acc + ) [] langs in + (match List.rev notes with + | notes :: _ -> printf "\n"; printf (f_"Notes:\n\n%s\n") notes - | _ :: _ | [] -> () ); print...
2014 Mar 11
3
[PATCH 1/2] builder: move some language-related code into a Languages module
...= + let notes = List.fold_left ( + fun acc lang -> + let res = List.filter ( + fun (langkey, _) -> + match langkey with + | "C" -> lang = "" + | langkey -> langkey = lang + ) notes in + match res with + | (_, noteskey) :: _ -> noteskey :: acc + | [] -> acc + ) [] languages in + List.rev notes diff --git a/builder/languages.mli b/builder/languages.mli new file mode 100644 index 0000000..f096e9a --- /dev/null +++ b/builder/languages.mli @@ -0,0 +1,21 @@ +(* virt-builder + * Copyright (C) 2014 Red Hat...
2014 Jan 30
0
Re: [PATCH] builder: output translated notes
...-> > + match List.filter ( > + fun (langkey, _) -> > + match langkey with > + | "C" -> lang = "" > + | langkey -> langkey = lang > + ) notes with > + | (_, noteskey) :: _ -> noteskey :: acc > + | [] -> acc > + ) [] langs in I've noticed you like to put huge expressions between match .. with! Let bindings can be nested arbitrarily, and are scoped to just the current level, so this might be easier to read: fun acc lang -&gt...