+-- Not really an adder either, but a slightly more complex example
+dup :: Bit -> (Bit, Bit)
+dup a = (a, a)
+
+-- Not really an adder either, but a simple stateful example (D-flipflop)
+dff :: Bit -> Bit -> (Bit, Bit)
+dff d s = (s', q)
+ where
+ q = s
+ s' = d
+
+type ShifterState = (Bit, Bit, Bit, Bit)
+shifter :: Bit -> ShifterState -> (ShifterState, Bit)
+shifter a s =
+ (s', o)
+ where
+ s' = (a, b, c, d)
+ (b, c, d, o) = s
+