Array implementation is mostly working; list implemenation is broken. Getting some errors about non-exhaustive patterns in both at runtime, probably not handling empty list in all cases, maybe due to a broken view method