[Haskell-beginners] Suggestions for creating a "bind" function that can be applied to different things?
Antoine Latter
aslatter at gmail.com
Tue Aug 2 02:27:14 CEST 2011
On Mon, Aug 1, 2011 at 6:44 PM, Costello, Roger L. <costello at mitre.org> wrote:
> Hi Folks,
>
> When I say:
>
> "Let x be of datatype Int."
>
> I think the proper terminology is "bind". That is, I bind the name "x" to the Int datatype.
>
> Is that the correct terminology?
>
When someone uses the terminology "bind" I assume that they are
referring to binding a value to a name, not associating a typing rule
with the name.
So in the haskell declaration:
> let f x = show x
I would use the word "binding" to refer to the introduction of the
variable named "x" as used in the body of the function "f".
That might be an over-limited view of the concept, and really this
only applies to to the study of the structure of programming languages
themselves - I feel like you might be talking about something
different.
I don't quite understanding what you're after in the rest of the post.
Are you implementing a compiler? Some sort of abstract analysis work?
What is your "DataType" type meant to represent? What is your
"Element" type meant to represent?
Antoine
More information about the Beginners
mailing list