Skip to content
DevMeme
4920 of 7435
When the University Serves Functional Programming Puns for Lunch
FunctionalProgramming Post #5386, on Sep 1, 2023 in TG

When the University Serves Functional Programming Puns for Lunch

Why is this FunctionalProgramming meme funny?

Level 1: One Word, Two Meanings

Imagine you’re really hungry and you tell your teacher, “I want some pie.” Instead of giving you a slice of yummy pie, the math teacher starts talking about pi (you know, 3.14159… the number). You’d probably be a bit confused, right? Because you meant one thing (a dessert) and the teacher thought you meant another (a math idea). That’s exactly what’s going on in this meme, but with the word “curry.”

The student is talking about curry, the tasty food. But the university (like a teacher or professor) thought of Curry, the computer science idea. In computer science, “currying” is a fancy concept about how functions work, and Haskell Curry is the person it’s named after. So instead of giving the poor student something to eat, they gave him a formula to look at! It’s funny because the same word “curry” has two meanings, and the mix-up leads to a very silly result: the student stays hungry, and gets a nerdy lesson as a consolation. In simple terms, he asked for dinner and got math instead. That surprise twist — one word meaning two totally different things — is what makes the meme joke work. It’s a big goofy misunderstanding, and that’s why we laugh!

Level 2: Not the Spicy Kind

Let’s break down the joke for those who haven’t marinated in this stuff. The humor comes from the word “curry” having two totally different meanings. First meaning: curry is a spicy dish — delicious food you might want to eat. Second meaning (in computer science): currying (or function currying) is a concept in functional programming where you take a function that needs multiple inputs and turn it into a chain of functions that each take one input. They sound the same, but trust me, currying the function has nothing to do with curry the food. The meme plays on this homonym confusion. When the student says “I want to eat curry,” he’s talking about lunch. But the University replies as if he asked about the concept Currying (notice they even capitalized "Curry" in the text, hinting it’s a proper noun or idea). Then they demonstrate “Curry at the University” by writing out the equation X × Y -> Z = X -> (Y -> Z). That’s basically the University saying, “Sure, we can give you Curry,” and proceeding to drop some computer science knowledge instead of bringing out a plate of food.

To understand why that equation is Curry (the CS kind), let’s explain it in simpler terms. In the notation X × Y -> Z, the × means a pair or a tuple of two things (think of it like (X, Y) together), and the -> means a function from one thing to another. So X × Y -> Z describes a function that takes two inputs at once (one of type X and one of type Y, as a combined pair) and returns something of type Z. It’s like a regular function f(x, y). Now, on the other side, X -> (Y -> Z) describes a function that takes one input of type X and returns another function (Y -> Z). That returned function in turn takes a Y and finally returns a Z. So X -> (Y -> Z) is a curried form: it’s a function that doesn’t need both X and Y at the same time — it takes X first, then later takes Y. The big claim of currying is that those two types of functions can do the exact same job. Any function that needs X and Y can be reworked as a function that takes X and gives you a new function that takes Y (and produces the same result). It’s a bit like magic: you split one meal into two courses 😉. Jargon-wise, currying is the process of converting f(x, y) into g(x)(y). And conversely, uncurrying would turn a curried function back into one that takes a pair. That’s what the equation in the meme is proclaiming.

Still a little abstract? Let’s use a concrete example in code to see currying in action. Say we have a simple function that adds two numbers. Normally, you might think of it as a function of two arguments, add(x, y). With currying, we would rewrite it as a function that takes one number and returns a new function that takes the second number. For example, in JavaScript:

function add(x) {
  return function(y) {
    return x + y;
  };
}

// Using the curried add function:
const add5 = add(5);      // add5 is now a function waiting for one number
console.log(add5(3));     // Output: 8 (which is 5 + 3)

Here, add is a curried function. You provide one argument x (say 5), and it gives you back a function add5 that remembers that 5 and expects the next argument y. When you call add5(3), it finally adds 5 and 3 to give 8. This two-step call add(5)(3) is exactly how currying works. It’s doing the same thing as a normal two-argument add(5, 3), but in curried form. Why do this? One benefit is partial application: you can supply one argument and get a specialized function back (we partially applied the original function with x=5). In many functional languages like Haskell, this is how all functions work by default! For instance, an equivalent Haskell definition could be:

add :: Int -> Int -> Int    -- means Int -> (Int -> Int)
add x y = x + y

This means add takes an Int and returns a function that takes another Int and returns an Int. If you give it both arguments add 5 3, you get 8. But you can also give just one: add 5 results in a function waiting for the second number. That’s currying in practice.

Now let’s contrast the two meanings of curry to really see the joke:

Curry (the food) Currying (the CS concept)
A spicy dish you can eat. A technique to transform functions in code.
Satisfies your hunger. Satisfies your need to structure programs elegantly.
Served on a plate or bowl. Usually shown on a whiteboard or in code (see that X -> (Y -> Z)!).
Involves ingredients and cooking. Involves data types and math/logic.
Example: chicken curry. Example: curried add function.

The meme is funny because the student wanted curry (the one from a kitchen), but the University gave him currying (the one from a computer lab). The phrase “We have Curry at University” was the big clue — capital “C” and context implies they mean the concept. They even demonstrate it with that formal type equation, as if handing out a lesson instead of lunch. It’s the ultimate nerdy misunderstanding.

Also, a quick bit of trivia that helps this make sense: Currying (the concept) is named after Haskell Curry, the mathematician. It’s just a coincidence that his last name is the same word as a popular dish. In academia, if someone says “Curry’s theorem” or “currying,” they’re almost always talking about him or his related concept, not food. In fact, the programming language Haskell is named after him too. So at a university, especially in a CS or math department, Curry with a capital C likely refers to the person or the function idea. They’re essentially saying, “We have Curry’s concept here at the university.” Unfortunately for our hungry student, that kind of Curry won’t fill your stomach — it’ll just fill your brain with more knowledge! The whole joke hinges on this double meaning. Once you know that, it’s easy to see why the meme’s last line is an equation: that’s the academic “Curry” being served. No actual food in sight, just some hearty CS fundamentals. 🍛🚫➡️💻✅

Level 3: From Food to Function

Every seasoned programmer or CS student can relate to this kind of mix-up: you mention something totally mundane and a computer scientist hears a technical term instead. In this meme, a hungry student says, “I really want to eat curry,” and the University proudly replies, “We have Curry at University.” Classic case of homonyms in a geeky context! This is coding humor that makes experienced devs chuckle because we’ve all seen how innocently saying a common word can trigger a nerdy lecture. Ask for Java around a programmer and you might get a spiel about Spring Boot instead of a cup of coffee. 😅 Similarly, mention curry in a computer science department, and someone is bound to grin and start talking about Haskell Curry or function currying. It’s like an inside joke among developers: we just can’t resist turning normal words into programming rants.

The meme sets up that expectation subversion perfectly. The “University” response is phrased like they misunderstood intentionally — as if the academic world only knows one kind of Curry. And then they double down by actually showing “Curry at the University:” followed by X × Y -> Z = X -> (Y -> Z). That line is essentially the professor pulling out a whiteboard and giving a mini-lecture on currying (the concept) right there. For a CS veteran, this scenario is developer humor gold because it captures a truth of academic life: sometimes you get knowledge when you were asking for nourishment. There’s even a saying, “There’s no such thing as a free lunch,” and here we see its nerdy twist — no free curry lunch, only more theory! The poor student’s plea for food got answered with food for thought. 😂

What makes this especially funny to those of us in the know is the sheer nerdiness of that final panel. The equation X × Y -> Z = X -> (Y -> Z) isn’t something you’d see outside a computer science or math class. It’s heavy CS_Fundamentals material — a notation one encounters in discussions of functional programming, type systems, or lambda calculus. The absurdity is palpable: imagine sitting in a university cafeteria saying “I’m craving curry,” and a professor pops up to correct, “Actually, Curry at this university refers to the concept that ( (X \times Y) \to Z ) is isomorphic to ( X \to (Y \to Z) )!” It’s so over-the-top pedantic that you can’t help but laugh. It pokes fun at how academia can sometimes be out of touch with everyday context, offering brilliant theoretical insights when you were just talking about lunch.

For senior devs or CS graduates, there’s also a wave of nostalgia and camaraderie in this meme. Many of us recall those long, abstract lectures about functional programming — discussing combinators, lambda calculus, monads, and yes, currying — often around the same time of day we’d rather have been getting lunch. This meme could have easily been born from a real quip in a functional programming class. It’s common for professors (especially the pun-loving kind) to make exactly this joke: “Anyone hungry for some Curry? Haskell Curry, that is!” Groan-worthy and brilliant at the same time. And let’s not forget, in many functional languages (like Haskell), currying isn’t just a theory; it’s the default way functions work. So experienced devs who have used such languages find it extra relatable — they’ve literally “had Curry for lunch” in their code. The humor here is a bit self-congratulatory too: if you instantly laugh, it means you recognize that formula and feel like part of the club. In the world of CS memes, getting the joke is a small badge of honor showing you’ve survived a dose of theoretical computer science. It’s a light-hearted reminder that our field is filled with double meanings and inside jokes, and sometimes the driest concept can be turned into a punchline. After all, in programming culture, turning food into functions is just another day at the office.

Level 4: Spicing Up Type Theory

At the highest level, the meme’s punchline is literally written in the language of type theory. It shows the elegant equation:

$$ (X \times Y \to Z) = (X \to (Y \to Z)) $$

This expresses the principle of function currying in formal terms. In plain English (well, as plain as advanced math gets): a function that takes a product type (X \times Y) as input and produces a (Z) is equivalent to a function that takes an (X) and returns another function (Y \to Z). In other words, a function of two arguments can be transformed into a function of one argument that returns another single-argument function. This is not mere coincidence or syntax sugar – it’s a profound property in the theory of functions. It essentially says that product types to arrow types conversion is always possible in a sufficiently powerful system. In category theory, this kind of isomorphism is the hallmark of a Cartesian closed category (the fancy term for a world where functions are first-class citizens and you can always curry and uncurry functions). To a category theorist or a lambda calculus enthusiast, (X \times Y \to Z \cong X \to (Y \to Z)) is as fundamental (and obvious) as saying “two plus two equals four” – it’s a built-in truth of how functions work in a functional programming universe.

Now, the term currying itself is not about spice at all – it’s named after the logician Haskell Curry. Back in the early 20th century, Haskell Curry (along with Moses Schönfinkel before him) studied combinatory logic and found you can eliminate the need for multiple-argument functions by cleverly transforming them into one-argument-at-a-time functions. This transformation was later dubbed currying in his honor. (Yes, the programming language Haskell is also named after Haskell Curry – a double homage to the man, which is delightfully appropriate here!) The meme’s university quote, “We have Curry at University,” is capitalized likely to hint at this proper name. It’s as if they’re saying, “We have Curry’s concept on the menu.” Indeed, in the world of CS fundamentals, Curry’s ideas are always being served.

In a practical sense, currying is what allows partial application of functions. The equation above isn’t just theoretical trivia – it means if you fix the first input (X) of a function, you get a new function waiting for (Y). For a real-world example, consider Haskell’s standard library definitions (in pseudo-Haskell):

curry   :: ((a,b) -> c) -> a -> b -> c
uncurry :: (a -> b -> c) -> (a,b) -> c

These functions curry and uncurry convert back and forth between the two forms. They witness the isomorphism of types: you give curry a single function (f) that takes a tuple ((a,b)) and it will produce a curried version of (f) that you can call as f_curried a b. Conversely, uncurry takes a curried function and packages its arguments into a tuple for one call. This works because of the underlying truth that the meme’s equation highlights. In the realm of lambda calculus, which underpins all functional programming, every function technically takes just one input (a lambda abstraction has one parameter). So to handle multiple inputs, you either bundle them into one (a tuple) or nest functions inside functions. Currying chooses the latter approach – it’s like a little theoretical trick that says, “hey, we can always trade one big bite for many small bites.”

So why is this DeveloperHumor? The meme sets up a delicious homonym trap. The student says “I want to eat curry” referring to the spicy dish, but the CS department cheekily “serves” up Curry (capital C) the concept, complete with a formal equation. For the initiated, seeing (X \to (Y \to Z)) in response to a hungry request is hilariously absurd. It’s as if the department answered a literal lambda calculus equation when someone mentioned lunch. Who needs actual food when you can chew on an equation, right? This nerdy punchline is only possible because we, as computer scientists, have co-opted the word curry for something deeply abstract. The humor lives in that contrast: one Curry is an edible meal, the other Curry is a brain-tickling equivalence of function types. It’s a joke that operates at a high academic plane — essentially tech humor that requires knowing a core piece of theoretical CS. (Also, fun fact for the truly initiated: the name Curry is immortalized in the Curry-Howard isomorphism too, which connects logic propositions to types. Curry’s fingerprint is everywhere in theoretical CS, so the University really does “have Curry” in a big way!). This meme is spicing up type theory with a hearty dose of pun, turning a dry concept into a punchline. If you recognized the formula and maybe even reminisced about a Haskell lecture, you’re in on the joke — it’s an exclusive dish for the functionally gourmet minds.

Description

A simple, text-based meme on a white background that plays on the word 'Curry'. The meme is structured in three parts. First line: 'Me : I really want to eat curry'. Second line: 'University: We have Curry at University'. Third line: 'Curry at the University:'. Below this, a mathematical formula is shown: 'X x Y -> Z = X -> (Y -> Z)'. The visual style is minimal, using only black text on a plain white surface. This meme uses the 'We have food at home' format to create a pun. The user desires the food 'curry,' but the university offers 'Currying,' a concept from computer science and mathematics. The formula shown is the type-theoretic representation of Currying, a technique used in functional programming to transform a function that takes multiple arguments into a sequence of functions that each take a single argument. It's a niche joke that resonates with those who have a formal computer science education or work with functional programming languages like Haskell

Comments

10
Anonymous ★ Top Pick In production, much like at the university cafeteria, you rarely get the curry you were hoping for. Instead of something satisfying, you get a series of partially applied functions that leave you hungry for a real solution
  1. Anonymous ★ Top Pick

    In production, much like at the university cafeteria, you rarely get the curry you were hoping for. Instead of something satisfying, you get a series of partially applied functions that leave you hungry for a real solution

  2. Anonymous

    Ordered curry, got X × Y → Z ≅ X → Y → Z and a TA insisting the dish is more scalable this way - rice ships later once the cafeteria’s lazy evaluator forces it

  3. Anonymous

    After 20 years in the industry, I still remember the exact moment in CS theory class when I realized 'currying' had nothing to do with lunch plans - though both can leave you feeling satisfied once you finally understand what you're consuming

  4. Anonymous

    Ah yes, the classic bait-and-switch: you show up hungry for some tikka masala and leave with a partially applied function. At least with currying in Haskell, every function is already curried by default - unlike university cafeteria curry, which requires explicit opt-in and usually results in immediate regret. The real kicker? Both leave you wondering why you didn't just order takeout (or use a language with better ergonomics)

  5. Anonymous

    Asked the university for curry; got Haskell Curry instead - X×Y→Z ≅ X→(Y→Z). Now my lunch is point-free and partially applied, and the eating happens in IO

  6. Anonymous

    University cafeteria: sorry, the only curry we serve is eta-reduced, right-associative, and comes with implicit lambdas - BYO appetite for Hindley-Milner

  7. Anonymous

    University curry: elegant in theory, but try debugging that nested thunk at dinner time

  8. @CcxCZ 2y

    Just wait for Curry–Howard–Lambek

  9. @CcxCZ 2y

    https://en.m.wikipedia.org/wiki/Haskell_Curry

  10. dev_meme 2y

    What about Curie at the university?

Use J and K for navigation