Questions tagged [elm]

Elm is a functional programming language for declaratively creating web browser based graphical user interfaces.

Filter by
Sorted by
Tagged with
3 votes
0 answers
32 views

Elm: Connect 4 game

I work as a front-end developer, mostly with Typescript. But now i decided to learn Elm as well, more out of curiosity than for any practical reason. My first program is a Connect 4 game, and in the ...
  • 131
1 vote
0 answers
612 views

Nineagram puzzle aid in Elm

My first Elm program. Nineagram is a puzzle that appears in the local newspaper. Given the nine letters for the day, the task is to come up with two five-letter words that share the same middle ...
2 votes
0 answers
138 views

A tiny library implementing the Elm Architecture in C++

Elm is a pure functional language for the front-end. It enforces an architecture that allows programs to stay pure in an event-based setting. This simple header-only library implements a variant of ...
2 votes
0 answers
54 views

Finding first duplicated value from "circular" list with a recursive function

Background This year I've taken on the challenge of Advent of Code. The second challenge of the first day is to calculate a frequency for a special device based on a series of numbers. Here's a quote ...
2 votes
1 answer
253 views

Basic PHP user authentication system for an Elm app

I made a simple authentication system with php for an elm webapp that will have a small number (1 - 5) of users able to log in. I am planning to send the users their php session-id at login, and ...
2 votes
1 answer
248 views

Generic message in Elm for simple model updates

In the Elm examples I have seen for form handling, they attach each input element with an update handler that sends out a very specific message to update the model according to the new input state. ...
  • 78
1 vote
0 answers
141 views

Simple Elm app using style-elements

I've done up a simple app for returning doses of medications for the treatment of a particular medical problem at various stages of treatment. I would like suggestions for how to better organize the ...
2 votes
1 answer
88 views

Buttons labelled with the number of times they have been clicked

I am new to functional programming and I decided to learn it thru Elm instead of haskell. I wrote a practice code where there are 2 buttons and their names correspond to the number of times they are ...
3 votes
1 answer
58 views

Generating a list of powers in Elm up to some limit

I'm looking to generate a list of powers in Elm, up to a certain limit. I've written the following tests: ...
  • 765
3 votes
1 answer
198 views

Introducing the basics of Elm using unit tests

I am an elm beginner and I want to provide an elm practical course to my coworkers. I will do a short presentation of elm, then we will move to practical lessons. The first lesson is to read ...
  • 98
7 votes
1 answer
175 views

Random Dice Simulation

I extended the example in 04-random.elm to support N dice and to draw the results using SVG. ...
2 votes
1 answer
49 views

Clear out a textbox after submitting its content

I struggled to figure out how to clear a textbox after submitting it's contents via a button control. I would like to know if my solution is an accepted practice for initializing a control after an ...
7 votes
2 answers
479 views

Github User Lookup

I have made my first app in Elm, a lookup of Github users. You type the name of the user into the search bar and the user's username and profile image - which has an anchor linked to their profile - ...
  • 1,292
2 votes
1 answer
224 views

`Maybe` handling in Matrix manipulation in Elm

I'd like to learn if my rewrite is worse than the original, less clear or less "idiomatic". I've found this code that handles updating two dimensional matrixes in Elm: ...
  • 238
7 votes
1 answer
525 views

Can this be written more concise and aligned with the Functional Reactive Programming paradigm?

Trying to learn FRP and Elm. Is the program below "ok" from the perspective of FRP and Elm? What could be improved? The program can be executed here: http://elm-lang.org/try ...
  • 173