fork download
  1. hobbies([mary, [reading, sewing, boxing]]).
  2. hobbies([richard, [reading, swimming, gaming]]).
  3. hobbies([allen, [chess, scrabble]]).
  4. haveHobbies(X):-hobbies([X,HList]),HList\=[],!, write(X)->write('TRUE');write('FALSE').
  5.  
Success #stdin #stdout 0.02s 68352KB
stdin
Standard input is empty
stdout
GNU Prolog 1.3.1
By Daniel Diaz
Copyright (C) 1999-2009 Daniel Diaz