Skip to content
Brian Marick edited this page May 19, 2017 · 1 revision
  1. Value Just "Dawn" and pattern (Just variable)

    Yes: variable is bound to "Dawn". Extra parentheses don't affect the match.

  2. Value Just "Dawn" and pattern Just "Brian"

    No: "Dawn" is different than "Brian".

  3. Value Just "Dawn" and pattern Ok "Brian"

    No: both because "Dawn" is different than "Brian" and also because Just is different than OK.

  4. Value Just "Dawn" and pattern Nothing

    No: something with two elements can't match something with one.

  5. Value Just "Dawn" and pattern Ok variable

    No: Just is different than Ok

  6. Value Just (Just "Dawn") and pattern Just (Just variable)

    Yes: Nested structures can be matched. variable is bound to "Dawn".

  7. Value Just (Just "Dawn") and pattern Just variable

    Yes: and variable is bound to Just "Dawn". Variables can match substructures.