~mdw
/
fringe
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
.gitignore: Don't worry about FASL files.
[fringe]
/
f#-fringe.fs
diff --git
a/f#-fringe.fs
b/f#-fringe.fs
index
efcc860
..
45d011b
100644
(file)
--- a/
f#-fringe.fs
+++ b/
f#-fringe.fs
@@
-1,4
+1,4
@@
-/// -*-f
#
-mode-*-
+/// -*-f
sharp
-mode-*-
///
/// F# implementation of a `same-fringe' solver.
///
/// 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
// 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
| 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.
///--------------------------------------------------------------------------
/// Nodes and trees.