Git Product home page Git Product logo

string-calc-ramda-kata's Introduction

pointfree_pokemon_kata

Purpose

Use this Kata as an exercise for the Pointfree-Programming style in JavaScript. You will need a Functional Programming library to perform this kind of programming style in JS. Imho Ramda (http://ramdajs.com/) is currently the best option.

Dependencies

Included in the Repository is the Jasmine-Testing Framework (http://jasmine.github.io) and the functional programming library Ramda.

How to use the Kata

Just open the SpecRunner.html in a browser. It runs the unit tests/specs. Your goals are to

  1. fix the spec "Pokemon-Kata should find the nearest distance to a Pokemon of type 'Normal'"
  2. write the body of the pending spec "Pokemon-Kata should find the name of the nearest Pokemon of type 'Normal'" and provide a working implementation

You can use the prepared functions "x", "y", "square" and "distance".

Challenges/Constraints

These are various things you could try out to spice up the kata.

  • Be 100% strict about using pointfree style: no function-keywords or =>-Operators at all.
  • Find a balanced approach to pointfree style, e.g. use traditional style functions or lambdas where it makes sense. Are there places where beeing a 100% strict would lead to unreadable code (aka pointless style :)) ?
  • Try to find different algorithms/approaches (especially for goal 2). What data needs to travel through which parts of the pipeline?
  • Come up with your own alternative implementation of the distance-function.
  • Use transducers for lazy evaluation.

Notes

  • the Pointfree Pokemon Kata was first used for the #ramdajs session @ #socrates16
  • You don't need to touch the specs for distance and square. They are just here for information/completeness purposes.
  • the implementation of the prepared function "distance" might give you an idea for a solution - or it might limit your solution space. In the latter case it might be best to not look at the implementation of distance at all :)
  • a good way to share (or maybe discuss) your solution is to fork the kata-repo on GitHub. No pull requests with solutions please :)

Reads/Talks on Pointfree Programming

string-calc-ramda-kata's People

Contributors

marcoemrich avatar avkaiser avatar mchunkytrunk avatar mmitch avatar franziskas avatar

Watchers

James Cloos avatar Joern Bernhardt avatar  avatar

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.