Comments (6)
The code as written in flow_control.md works for me:
(defn leap-year?
"Every four years, except years divisible by 100, but yes for years divisible by 400."
[year]
(and (zero? (mod year 4))
(or (zero? (mod year 400))
(not (zero? (mod year 100))))))
(leap-year? 1900) ; false
(leap-year? 2000) ; true
What were you seeing?
from curriculum.
I switched lines 5 and 6 and then it worked, before it was returning true,
true
On Mon, Dec 22, 2014 at 1:55 PM, David Chambers [email protected]
wrote:
The code as written in flow_control.md
https://github.com/ClojureBridge/curriculum/blob/master/outline/flow_control.md
works for me:(defn leap-year?
"Every four years, except years divisible by 100, but yes for years divisible by 400."
[year](and %28zero? %28mod year 4%29%29
%28or %28zero? %28mod year 400%29%29
%28not %28zero? %28mod year 100%29%29%29%29))(leap-year? 1900) ; false
(leap-year? 2000) ; trueWhat were you seeing?
—
Reply to this email directly or view it on GitHub
#122 (comment)
.
from curriculum.
Could you try copying the snippet from my comment above and pasting it into the instarepl? Perhaps one of your parens was in the wrong place.
from curriculum.
that is weird it does work!
On Mon, Dec 22, 2014 at 2:10 PM, David Chambers [email protected]
wrote:
Could you try copying the snippet from my comment above and pasting it
into the instarepl? Perhaps one of your parens was in the wrong place.—
Reply to this email directly or view it on GitHub
#122 (comment)
.
from curriculum.
maybe it was light table, sorry
On Mon, Dec 22, 2014 at 2:19 PM, Shakrah Yves [email protected] wrote:
that is weird it does work!
On Mon, Dec 22, 2014 at 2:10 PM, David Chambers [email protected]
wrote:Could you try copying the snippet from my comment above and pasting it
into the instarepl? Perhaps one of your parens was in the wrong place.—
Reply to this email directly or view it on GitHub
#122 (comment)
.
from curriculum.
No worries. :)
from curriculum.
Related Issues (20)
- Add "'git' is not recognized as an internal or external command" to install troubleshooting HOT 2
- "Infix vs. prefix" slide is slightly confusing HOT 1
- Add map and reduce to student cheatsheet HOT 2
- Intermediate curriculum HOT 4
- Sample quil app instructions in Installfest - copy to other platforms HOT 1
- Module 6, slide 10: Provide a more detailed example for get-names exercise HOT 2
- Slides vs markdown? HOT 3
- Make exercises less mathy/numbers oriented HOT 4
- Make gh-pages branch default? HOT 2
- Update slide for maps in the data structures section covers too much material.
- Additional slides for curriculum HOT 1
- LightTable instarepl depreciated HOT 3
- Link to PDF not working
- Improving macOS install instructions HOT 4
- proposal: delete master branch HOT 3
- Is the material here suitable for self taught a.k.a freecodecamp? HOT 1
- nogogiri security vulnerability
- Creating multi-language filters for documentation and curriculum HOT 2
- Alternatives to Nightcode editor? HOT 2
- Beginner curriculum HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curriculum.