-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Am 30.12.12 07:14, schrieb Laurent PETIT:
>> `when` provides an implicit `do`, so I generally try to only use
>> it when I want side-effects. (Other side-effecty forms include
>> `do`, `doseq`, `dotimes` and `when-not`.)
> 
> On the other end, using when allows you to be explicit in your
> code that there's no "else" clause

And it's quite useful when working with sequences:

(when-let [s (seq coll)]
  (do-stuff-with s))

Meikel


-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBAgAGBQJQ4DRBAAoJEM2sO9pIirXjPioP/jpvmSpSBm7wlsNXTgTORTXG
JhOw0ri1CUlw3Gg/zuXFuIXZBsga2kjF7LNk1TyDc5whNlU6WwVYGiVjqL/lCI2i
j372h63/pzKfw6BSnLr9pOcRM+hu70JrvDTdk+qddJlQ68v/Uex2QvxwfGQlwDc2
ogGE2xglqzSRKWJ3g3AB5ctFhbNGn6nRNcoxvSmUOL+2KkVDn5mjP/zMsG3V/anC
9yJDZf+qJk8kWzBB0YPJIAnqgmzyWFfzsqlgiafpxWG5R+Xu9+JEDFmumPgBz2jr
MLZHRSaimffiXIgW6mudLy88qoRn94tUrR9GZx/Nwx//IqqoBQn6FO+R+63BKDNK
x1oR42iG87SjQM9a6h20R+VnhD7efV2/WqZC/0ZYBW5SHh1iU9Gzip1XwrPJvi8E
8WJgEPXlj3jnyEq7PHuRsQvznPuSmULqzgtAUdl3XbkxcWvJDbCupZKChzsABu8I
JG0xVlokLhDn0lqnq74URV8tTe2P5096jgLQ6jiA940o+EUwozTn2nv+tmCN+pe8
LQF4VvCw07aizInR+qaAM1LOBMLjbA5Vjqi2b0rHwCVrGOl2tAqAAZNL610zb3Tz
nwTG1ycs8MO+eOxCWPs677jB4QesfilaQASZ50u8ZV0pRlnhDol5rH102N1pSClg
lFh4F7RhSLIDhKgZymCR
=DUpD
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to