学习函数式/Clojure 编程 - 实践练习? [英] Learning functional/Clojure programming - practical exercises?

查看:14
本文介绍了学习函数式/Clojure 编程 - 实践练习?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Clojure 学习函数式编程.您可以推荐哪些实践练习?带有解决方案的在线存储库将是完美的.

I'm learning functional programming with Clojure. What practical exercises can you recommend? Online repositories with solutions would be perfect.

我能想到的一个想法是遍历所有流行的排序、树、图等算法,并自己在 Clojure 中实现它们.虽然它可以工作,但它可能非常陡峭,而且我很可能效率低下(与知道自己在做什么的人相比).

One idea I can think of is going through all the popular algorithms on sorting, trees, graphs etc. and implementing them in Clojure myself. While it could work, it may be pretty steep and I'm likely to do it inefficiently (compared to someone who knows what she's doing).

推荐答案

我建议做 Project Euler 练习:

I would recommend doing the Project Euler exercises:

http://projecteuler.net/

欧拉计划是一系列具有挑战性的数学/计算机需要的编程问题不仅仅是数学见解来解决.虽然数学会帮助你达到优雅和有效的方法,使用计算机和编程技能将需要解决大多数问题.

Project Euler is a series of challenging mathematical/computer programming problems that will require more than just mathematical insights to solve. Although mathematics will help you arrive at elegant and efficient methods, the use of a computer and programming skills will be required to solve most problems.

因为很多程序员都在解决 Project Euler 练习,你可以将这些解决方案与其他(非函数式)编程语言进行比较,但也可以使用 Clojure 解决方案:http://clojure-euler.wikispaces.com/,因此您可以对比命令式与函数式/惯用式 Clojure.

Because many programmers are solving Project Euler exercises, you can compare the solutions to other (non-functional) programming languages, but also Clojure solutions are available: http://clojure-euler.wikispaces.com/, so you can contrast imperative vs. functional/idiomatic Clojure.

当然,先自己做练习,而不用咨询任何解决方案,你会学到最多的东西.

Of course you will learn the most by first doing the exercises yourself, without consulting any of the solutions.

这篇关于学习函数式/Clojure 编程 - 实践练习?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆