14 lines
226 B
Text
14 lines
226 B
Text
defimpl Result for: Ok, as: ->
|
|
|
|
def ok? as: -> true end
|
|
def error? as: -> false end
|
|
|
|
def <Any> ok as: ->
|
|
@value
|
|
end
|
|
|
|
def <Any> error as: ->
|
|
Huia::Primitive.panic("Attempt to access error from Ok")
|
|
end
|
|
|
|
end
|