I'm new to functional programming and Haskell and I love its expressive
ability! I've been trying to formalize the following function for time.
Given people and a piece of information, can all people know the same thing?
Anyway, this is just a bit of fun... but can anyone help me reduce it or
knowing it.
Sorry, if I've messed with your heads, it's just I've been into Haskell for
a month and though I'd join (what seems to be) the forum and post something
quirky.
=)
Luke Palmer-2 wrote:
On Dec 19, 2007 7:26 PM, jlw501 [EMAIL PROTECTED] wrote:
I'm new to functional programming
The main observation I've made it when playing with the values of knowing the
self and perfect communication, nothing else becomes undefined if just
perfect communication is true, it is still depended on knowing the self if
you can have knowledge. Makes sense.
jlw501 wrote:
Just to clarify
Good point.
By fold/unfold transformation you get the following:
contains = flip elem [Eureka]
=
contains xs e = flip elem xs e [Expose data structures]
=
contains [] e = False
contains (x:xs) e = flip elem (x:xs) e [Instantiate]
=
contains [] e = False
contains (x:xs) e = elem e x:[] || flip