Skip to content

Instantly share code, notes, and snippets.

@nobiinu-and
nobiinu-and / roman_numerals_calculator.elm
Created April 15, 2017 14:26
ローマ数字の計算機のElmコード。Assert関数は自前で用意。モブプログラミングでTDDで書いたもの。アジャイルジャパン2017にて / Roman Numerals Calculator elm code written in a mob programming session in TDD way at Ajile Japan 2017
import Html exposing (li, text, ul)
import String exposing (split)
add a b =
numberToRoman ((romanToNumber a) + (romanToNumber b))
romanToNumber roman =
List.length(split "" roman)
{- case roman of
"I" -> 1

take2 は https://github.com/haru01/log/blob/master/pattern_sheed.md

TDD実践・学習パターン

TDDを 初心者が熟練者になって、現場で実践していくコツを書いていきます。 すべて実施する必要はありません。上から順に実施する必要もありません。 現状の診断や、自分の状況に合いそうなものを複数ピックアップして、 ベイビーステップで個人やチームの学習と成長の物語を描く道具として使われることを想定しています。

まだ未完です。ガンガン変わっていきます。 :p

@haru01
haru01 / gist:4145680
Created November 25, 2012 22:27
sudoku
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using NUnit.Framework.Constraints;
namespace sudoku {
[TestFixture]
public class SudokuBoardTest
# -*- coding: utf-8 -*-
from fractions import Fraction
import unittest
def fraction_from_repeating(period, base=10):
"""
Return a fraction equivalent to the given repeating decimal.