create_user = (fn email , name ) { { email = email username = (either_or name email) } } (assert_equal { email = "bob@example.com" username = "bob" }, (create_user "bob@example.com" some("bob")) ) (assert_equal { email = "sue@example.com" username = "sue@example.com" }, (create_user "sue@example.com" none) )