Skip to content
Discussion options

You must be logged in to vote

Oh, it matches on (None) - in brackets.

  (declare ha ( (Optional Shard) -> Shard -> (Optional String)))
  (define (ha old-shard shard)
    (match old-shard
      ((Some old) (if (== old shard) None
                      (Some (mconcat (make-list "Expected" (into old) " received:" (into shard))))))
      ( (None) None)))

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@stylewarning
Comment options

Answer selected by angelpopov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help!
Labels
None yet
2 participants