GithubHelp home page GithubHelp logo

packtworkshops / the-clojure-workshop Goto Github PK

View Code? Open in Web Editor NEW
72.0 6.0 39.0 27.99 MB

A New, Interactive Approach to Learning Clojure

License: MIT License

Clojure 96.84% CSS 0.46% HTML 2.34% Shell 0.25% Batchfile 0.13%
repl leningen lazy-sequences reagent figwheel clojurescript map filter destructuring

the-clojure-workshop's People

Contributors

adityashah95 avatar jazzytomato avatar josf avatar konradszydlo avatar packtsupport avatar rutu2709 avatar rutuja027 avatar transducer avatar viebel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

the-clojure-workshop's Issues

Errata in Activity 3.01

I got different results because your code is different from that from the book:

(def walking-speed 4)

Book says:

... and an average of walking speed of 5 km per hour.

(defn distance
	"Returns a rough estimate of the distance between two coordinate points, in kilometers. Works better with smaller distance"
	[{lat1 :lat lon1 :lon} {lat2 :lat lon2 :lon}]
	(let [deglen 110.25
				x (- lat2 lat1)
				y (* (Math/cos lat2) (- lon2 lon1))]
				(* deglen (Math/sqrt (+ (* y y) (* x x))))))

Book has:

110.25 * sqrt((lat2 - lat1)^2 + cos(lat1) * (lon2 - lon1)^2)

Please notice that has cos(lat1) not cos(lat2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.