function Option.AndThen(f,D)if f:IsSome()then local s=D(f:Unwrap())Option.Assert(s)return s else return Option.None end end

function Option:AndThen(andThenFn)
	if self:IsSome() then
		local result = andThenFn(self:Unwrap())
		Option.Assert(result)
		return result
	else
		return Option.None
	end
end

