spacepaste

  1.  
  2. let mask_of_enum =
  3. Enum.fold
  4. (snd
  5. |- String.enum
  6. |- Enum.map (function '-' | '?' -> false | _ -> true)
  7. |- Array.of_enum
  8. |- Array.map2 (||)
  9. |> flip)
  10. initial_mask
  11.