Path: utzoo!attcan!uunet!mcsun!cernvax!julian From: julian@cernvax.UUCP (julian bunn) Newsgroups: comp.lang.prolog Subject: Simple Prolog Question Message-ID: <2157@cernvax.UUCP> Date: 8 Aug 90 15:37:35 GMT Organization: CERN, Geneva, Switzerland Lines: 19 Can some kind person please help with a trivial Prolog problem? I am trying to write a program that will remove leading blank characters from a list. For example, the result of: remove_blanks([32,32,32,104,104],X). should be: X = [104,104] I have tried, with reckless abandon, the following definition: remove_blanks([H|T],T) :- H=32, remove_blanks(T,_). remove_blanks(S,S). which, when tracing, seems to do nicely recursively, but in the end returns me with T equal to the original list! Help !