coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "Marcus Ramos" <mvmramos AT gmail.com>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] String build and print
- Date: Fri, 5 Jul 2013 16:59:06 +0200 (CEST)
Hello all,
I am trying to further develop the library String, and thus have the following
piece of code:
Inductive string: Set :=
| epsilon: string
| sym: ascii->string
| cat: ascii->string->string.
Fixpoint append (s1 s2: string): string :=
match s1 with
| epsilon => s2
| sym c => cat c s2
| cat c s => cat c (append s s2)
end.
I would like to write a fixpoint stringdenote that parses, for example:
(cat "a" (sym "b"))(sym "c")
and returns "abc" in the screen. Does any one know I can achieve this? In
other words, how can I build a string of characters as a return value of this
fixpoint and print the value on the screen? Sorry if this is too basic, but I
really haven´t found my way through.
Thanks in advance,
Marcus.
- [Coq-Club] String build and print, Marcus Ramos, 07/05/2013
- Re: [Coq-Club] String build and print, t x, 07/06/2013
Archive powered by MHonArc 2.6.18.