joshan beha
joshan beha

Reputation: 21

How to write statement formally?

I have natural number list and want to set hypothesis that head of list cannot be zero,when l is nil. like (0::nil) gives false. How to write it formally?I have error message ,when write it as

 ((h::nil)=?(0::nil))=false. 

Upvotes: 0

Views: 48

Answers (1)

Vilhelm Sjöberg
Vilhelm Sjöberg

Reputation: 503

For example you could use a match statement:

match xs with
 | 0::nil => False
 | _ => True
end

Upvotes: 1

Related Questions