List Info

Thread: "ocaml_beginners"::[] inductive definition of a list




"ocaml_beginners"::[] inductive definition of a list
country flaguser name
United States
2008-07-09 14:10:56

I've been wondering whether a particular way of defining a set is an
inductive definition. This way of defining a list is the best example.

type 'a list = Nil | Cons of 'a * 'a list;;

This way of defining a list seems backwards. An element is an int list
if some previously defined element is an int list.

Whereas, if you have a set of rules X/y and you take the smallest set
I such that if X is a subset of I then y is in I, the elements of I
are generated (forwards) from the axioms.


__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )