lean4-htt/library/init/string.lean
2016-05-26 10:43:26 -07:00

20 lines
511 B
Text

/-
Copyright (c) 2016 Microsoft Corporation. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Author: Leonardo de Moura
-/
prelude
import init.char init.list
definition string [reducible] := list char
namespace string
definition empty : string := list.nil
definition str : char → string → string := list.cons
definition concat (a b : string) : string :=
list.append b a
end string
definition string.has_add [instance] : has_add string :=
has_add.mk string.concat