go-fringe.go: Language change: `closed' function on channels has gone.
[fringe] / f#-fringe.fs
index efcc860..cc00318 100644 (file)
@@ -1,4 +1,4 @@
-/// -*-f#-mode-*-
+/// -*- mode: fsharp-mode; indent-tabs-mode: nil -*-
 ///
 /// F# implementation of a `same-fringe' solver.
 
@@ -41,16 +41,11 @@ let list_iterator it = it |> fold_iterator (curry List.Cons) [] |> List.rev
 // Asnwer whether two iterators report the same items.
 let rec same_iterators_p ita itb =
   match next ita with
-    | None ->
-      match next itb with
-        | None -> true
-        | _ -> false
+    | None -> Option.isNone(next itb)
     | Some (a, ita) ->
       match next itb with
-        | None -> false
-        | Some (b, itb) ->
-          if a = b then same_iterators_p ita itb
-          else false
+        | Some (b, itb) when a = b -> same_iterators_p ita itb
+        | _ -> false
 
 ///--------------------------------------------------------------------------
 /// Nodes and trees.
@@ -119,5 +114,5 @@ let main args =
     | exc ->
       fprintf stderr "%s: %s\n" program_name exc.Message
       1
-  
+
 ///----- That's all, folks --------------------------------------------------