def word_rest
cli@0.2.0.0 · cli.bend:4792
import cli@0.2.0.0/cli.bend as Cli
import Base
4792
4793
4794
4795def word_rest(name: String, text: String, same: Bool) ->
4796 Maybe<&2, Maybe<&2, String>>:
4797 match name text same:
4798 case _ _ False{}: None{}
4799 case SNil{} SNil{} True{}: Some{None{}}
4800 case SNil{} SCon{Chr{32}, rest} True{}: Some{Some{rest}}
4801 case SCon{Chr{32}, xs} _ True{}: None{}
4802 case SCon{x, xs} SCon{y, ys} True{}: word_rest(xs, ys, Char.is_eq(x, y))
4803 case _ _ _: None{}