/tutorial/backtracking/tiny_prolog/prolog_functor.e
http://github.com/tybor/Liberty · Specman e · 20 lines · 19 code · 1 blank · 0 comment · 1 complexity · 8ed3dce97a5aa210998de69244ad4038 MD5 · raw file
- expanded class PROLOG_FUNCTOR
- inherit
- COMPARABLE
- HASHABLE
- feature
- name: PROLOG_ATOM
- arity: INTEGER
- infix "<"(other: like Current): BOOLEAN is
- do
- Result := name < other.name
- if not result and not other.name < name then
- Result := arity < other.arity
- end
- end
- hash_code: INTEGER is
- do
- Result := (name.hash_code * arity) & 0x7FFFFFFF
- end
- end