Created
November 16, 2019 13:24
-
-
Save maxfarseer/cbe603d3f8da5273c9de7db829e2202f to your computer and use it in GitHub Desktop.
Making impossible state video
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- zip list структура | |
-- обернутая в custom type с одним вариантом | |
type History = | |
History | |
{ previous : List Question | |
, current : Question | |
, remaining : List Question | |
} | |
-- следовательно, для работы придется использовать case | |
back : History -> History | |
back history = | |
case history of | |
History { previous, current, remaining } -> | |
... | |
-- или не придется! Можно использовать: | |
back : History -> History | |
back (History { previous, current, remaining }) = | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment