coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Stéphane Glondu <steph AT glondu.net>
- To: Satrajit Roy <satrajit.roy AT gmail.com>
- Cc: coq-club AT pauillac.inria.fr
- Subject: Re: [Coq-Club] Lists & Strings
- Date: Tue, 11 Nov 2008 17:20:20 +0100
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
- Openpgp: id=FCE03DAA
Satrajit Roy wrote:
> [...]
> Record y: Set := createY {
> y': string;
> y'': list x;
>
> y''': bool :=
> match (length y') return bool with
> | 0 => false
> | _ => true
> end;
>
> y'''' : bool :=
> match (length y'') return bool with
> | 0 => false
> | _ => true
> end
> }.
> [...]
Use List.length to get the length of y''. For the sake of clarity, I
recommend you to use String.length for y' as well.
Cheers,
--
Stéphane Glondu
- [Coq-Club] Re: Lists & Strings, Satrajit Roy
- Re: [Coq-Club] Lists & Strings, Stéphane Glondu
- Re: [Coq-Club] Lists & Strings, Satrajit Roy
- Re: [Coq-Club] Lists & Strings, Stéphane Glondu
Archive powered by MhonArc 2.6.16.