practicalli / practicalli/clojure

partial and comp verses anonymous functions (lambda)

Open
#397 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

clojure-core
Dominant language
Makefile
Stars
117
Forks
36
PR merge metrics
No merged PRs in 30d

Description

partial vs lambas
lambdas are considered more idiomatic than partial and comp

reasons to prefer lambdas?

They are often shorter, and often produce nicer stacktraces

The behavior of comp and partial when used to create top level defs can be surprising when you redefine things

I believe rich has at least once said partial wouldn't be part of clojure.core if the function short hand syntax had existed first

I think nicer stacktraces is the "big reason" I was looking for. Thanks!

They are also easier to debug - if that’s your thing; I find cider’s debugger very useful

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. First clarify whether this discussion should become documentation, and identify the intended location and examples for comparing partial, comp, and anonymous functions. Done would require an agreed scope and a concrete documentation change, but the issue currently provides neither.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.