Posts tagged PE1

Jun 12

F# - Project Euler #4

F#, Project_Euler, PE1 | comment

This is probably the first problem with which I felt like I was writing closer to the functional paradigm. It still takes a good amount of discipline to avoid writing purely imperative code. I have also been paging through several F# books in an effort to beef up my skills a little. So far, the cream of the crop has been “Expert F#” by Don Syme, Adam Granicz and Antonio Cisternino. I highly recommend it to anyone looking to learn the language. Don’t let the “expert” scare you away. It has been extremely useful to me. Even as a beginner. Without further ado - #4:

Continue reading »

Jun 12

F# - Project Euler #3

F#, Project_Euler, PE1 | comment

Here is a solution for problem 3. I got a little lazy with the unit tests this time. I’m not sure if the REPL is helping or hurting my development process. It’s certainly very handy, but I’d probably be better off writing tests that I can run and re-run.

Continue reading »

Jun 10

F# - Project Euler #2

F#, Project_Euler, PE1 | comment

Here is my F# solution for Project Euler question 2. So far, the F# syntax is very appealing to me. Like other functional languages, there is a much wider variety of ways to solve a given problem than is typical with pure OO languages. Writing idiomatic F# will likely take me quite a bit longer, but hopefully any feedback solicited here will help me progress more quickly.

Continue reading »

Jun 09

Learning F# with Project Euler

F#, Project_Euler, PE1 | comment

Recent work related changes have given me the opportunity to learn and use F# at work. The prospect of working more extensively in a functional language is an exciting one. Although I have invested quite a bit of time learning Clojure, I was doing so on my own time. Having the opportunity to do some functional programming “on the clock” is appealing for obvious reasons. That being said, I am just getting started with F#, so any feedback about how to write more robust or idiomatic code is welcome as always.

Continue reading »