Skip to content

Instantly share code, notes, and snippets.

@maxfarseer
Created November 16, 2019 13:24
Show Gist options
  • Save maxfarseer/cbe603d3f8da5273c9de7db829e2202f to your computer and use it in GitHub Desktop.
Save maxfarseer/cbe603d3f8da5273c9de7db829e2202f to your computer and use it in GitHub Desktop.
Making impossible state video
-- 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