We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d6c4d4 commit 2edf133Copy full SHA for 2edf133
src/pure/stack.rs
@@ -995,6 +995,22 @@ mod quickcheck_tests {
995
}
996
997
998
+ #[quickcheck]
999
+ fn focus_head_preserves_order(mut stack: Stack<u8>) -> bool {
1000
+ let original = stack.clone().flatten();
1001
+ stack.focus_head();
1002
+
1003
+ stack.flatten() == original
1004
+ }
1005
1006
1007
+ fn focus_tail_preserves_order(mut stack: Stack<u8>) -> bool {
1008
1009
+ stack.focus_tail();
1010
1011
1012
1013
1014
// Define a composition law for operations on a Stack.
1015
// Using these as the real implementation is not particularly efficient but the laws should
1016
// hold for the hand written impls as well.
0 commit comments