[erlang-questions] Printed list to Erlang function

lloyd@REDACTED lloyd@REDACTED
Tue Mar 29 18:59:28 CEST 2016


Hello,

So, I have a printed list of stop words:

http://www.ranks.nl/stopwords

I'd like to turn this list into an Erlang function that I can query---

stopwords() ->
   ["word1", "word2" ... "wordN"].

is_stopword(Word) ->
   List = stopwords(),
   lists_member(Word, List).

All my efforts so far have evolved into ugly kludges. Seems to me there must be an elegant method that I'm overlooking.

Some kind soul point the way?

Many thanks,

LRP

*********************************************
My books:

THE GOSPEL OF ASHES
http://thegospelofashes.com

Strength is not enough. Do they have the courage 
and the cunning? Can they survive long enough to 
save the lives of millions?  

FREEIN' PANCHO
http://freeinpancho.com

A community of misfits help a troubled boy find his way 

AYA TAKEO
http://ayatakeo.com

Star-crossed love, war and power in an alternative 
universe

Available through Amazon or by request from your 
favorite bookstore


**********************************************




More information about the erlang-questions mailing list