
Phylax
Web Development with Clojure, Third Edition: Omitted `var` (page 38)
After the introduction of of muuntaja
the -main function changes from
(defn -main []
(jetty/run-jetty
(-> handler
var
wrap-nocache
wrap-reload)
{:port 3000
:join? false}))
to
(defn -main []
(jetty/run-jetty
(-> #'handler
wrap-nocache
wrap-formats
wrap-reload)
{:port 3000
:join? false}))
The handler is no longer turned into a var
which defeats the purpose of wrap-reload
(which is still present). Possibly a slip worth being corrected.
Thanks for this great book!
Marked As Solved

svmbrown
Author of Web Development with Clojure
Hi, we replace (-> handler var ...)
with (-> #'handler ...)
. This does the exact same thing, but uses the #'
syntax sugar instead of calling var explicitly. We’ve added an explanation of this syntax to clarify.
Hope this helps!
1
Also Liked

Dmitri
Author of Web Development with Clojure
Good catch, thanks! we’ll update in the next release.
2

Phylax
You’re quick, thanks. JFYI: As I’m working through the book I’ve found the same omission on p. 42, so maybe there’s more. Cheers!
1
Popular Pragmatic Bookshelf topics

As per the title, thanks.
New

Title: Hands-On Rust (Chapter 11: prefab)
Just played a couple of amulet-less games. With a bit of debugging, I believe that your can_p...
New

Page 28: It implements io.ReaderAt on the store type.
Sorry if it’s a dumb question but was the io.ReaderAt supposed to be io.ReadAt?
...
New

Running mix deps.get in the sensor_hub directory fails with the following error:
** (Mix) No SSH public keys found in ~/.ssh. An ssh aut...
New

When I run the coverage example to report on missing lines, I get:
pytest --cov=cards --report=term-missing ch7
ERROR: usage: pytest [op...
New

When trying to run tox in parallel as explained on page 151, I got the following error:
tox: error: argument -p/–parallel: expected one...
New

The markup used to display the uploaded image results in a Phoenix.LiveView.HTMLTokenizer.ParseError error.
lib/pento_web/live/product_l...
New

It seems the second code snippet is missing the code to set the current_user:
current_user: Accounts.get_user_by_session_token(session["...
New

The allprojects block listed on page 245 produces the following error when syncing gradle:
“org.gradle.api.GradleScriptException: A prob...
New

From page 13:
On Python 3.7, you can install the libraries with pip by running these commands inside a Python venv using Visual Studio ...
New
Other popular topics

Algorithms and data structures are much more than abstract concepts. Mastering them enables you to write code that runs faster and more e...
New

Which, if any, games do you play? On what platform?
I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New

Bought the Moonlander mechanical keyboard. Cherry Brown MX switches. Arms and wrists have been hurting enough that it’s time I did someth...
New

I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New

poll
poll
Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New

Author Spotlight
James Stanier
@jstanier
James Stanier, author of Effective Remote Work , discusses how to rethink the office as we e...
New

The File System Access API with Origin Private File System.
WebKit supports new API that makes it possible for web apps to create, open,...
New

Hair Salon Games for Girls Fun
Girls Hair Saloon game is mainly developed for kids. This game allows users to select virtual avatars to ...
New

Contracted AI raters describe grueling deadlines, poor pay and opacity around work to make chatbots intelligent
New

A new version of Rust’s image crate has support for EXIF orientation, which allows me to resize images without mangling their rotation.
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /rails
- /js
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /onivim
- /typescript
- /svelte
- /crystal
- /kotlin
- /c-plus-plus
- /tailwind
- /gleam
- /react
- /ocaml
- /flutter
- /elm
- /vscode
- /ash
- /html
- /opensuse
- /centos
- /php
- /deepseek
- /zig
- /scala
- /textmate
- /sublime-text
- /lisp
- /nixos
- /debian
- /react-native
- /agda
- /kubuntu
- /arch-linux
- /django
- /revery
- /ubuntu
- /spring
- /manjaro
- /nodejs
- /diversity
- /lua
- /julia
- /c
- /slackware
- /neovim