HN user

mneary

1 karma
Posts0
Comments24
View on HN
No posts found.

Function composition is a single, special case of a function accepting functional arguments. You could define the compose operator as below:

    compose : (a -> b) -> (b -> c) -> (a -> c)
    a `compose` b = \x -> b(a(x))
However, there is a whole spectrum of additionally possible functions which can be built to accept functions as arguments. Here's a couple of example:
    partial3 : (Integer -> Integer -> Integer) -> (Integer -> Integer)
    partial3 f = f 3
    map : [a] -> (a -> b) -> [b]
    map [] f = []
    map (x:xs) f = (f x):(map xs f)
The first one takes a function and applies an argument, 3; the next one takes a list and a function and maps the list using the provided function. The idea of functions as arguments is a very powerful one, and from my understanding one with which people sometimes struggle.

My first thought when I read this title was that there should be a site like Hoogle for mathematical proofs, where one could search by type signature for existing proofs. I'm not sure if people often think of proofs in terms of their type signature, but by Curry-Howard it would be doable.

TDD your API 12 years ago

That's really quite impressive! I hadn't realized that you meant that an endpoint can be referenced "in the abstract" without explicit parameters, which makes for much easier integration.

For some reason, though, I feel like the natural language would actually intimidate me. Where are ideas like "sufficient funds" defined?

TDD your API 12 years ago

Yeah, I realized the same thing; this aspect really makes it harder to keep the system simple, naturally. I've thought about different ways of approaching this, considering chained requests as a possibility.

I think that this can be improved by removing the All and Any operators and instead letting segmentations be nested. So for example:

  All
    a = b
    Any
      All
        c = d
        d = f
      c = e
would be
  a = b
    c = d
      d = f
    c = e
I think that it is more intuitive to segment the set as you go.

Considering the idea of a programming language a fundamental innovation derived from FORTRAN disregards earlier concepts, like Gödel numbering from the year 1931, which exhibit language interpretation. I guess what I'm trying to say is that every good idea is closely related to countless others; pigeon-holing them into the Only 8 categories and naming a "first" doesn't do justice to all of the interesting ideas of computation.

I think being a valedictorian has a lot more to do with saying goodbye (vale) than it does being validated, but I do think you might be right about Google's bias toward those who seek validation.

A for-loop might be a basic programming construct, but it shouldn't be. Mutation and a control flow construct makes for a much worse outlook to the problem than does recursive application of a function.

A far cleaner solution:

    console.log(process.argv.slice(2).reduce(function(a, x) {
      return a + parseFloat(x) 
    }, 0));

There are plenty of worthwhile subjects in Math which have no concrete application to the real world. One needs to be able to understand these abstract ideas for what they are, not merely formality surrounding a simple real life phenomenon.

I went back and forth with that. I think I went with postfix because there exists another syntax which looks prefix:

    T([Number, Number])(function(x) { return x; })
For this method, a function type is defined and then serves as a constructor that accepts a function as argument.

I do not see how anyone could possibly believe the author is exhibiting misogyny. Perhaps you are confused by the meaning of the word:

Misogyny /mɪˈsɒdʒɪni/ is the hatred or dislike of women or girls.