alpha
Login
or
Join now
shuuji3.xyz
/
normal-haskell-programming-book
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
[READ-ONLY] Mirror of https://github.com/shuuji3/normal-haskell-programming-book. Codes for『ふつうのHaskellプログラミング』http://www.loveruby.net/ja/stdhaskell/
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
expand version 1
author
TAKAHASHI Shuuji
date
9 years ago
(Aug 23, 2017, 6:21 AM +0900)
commit
3ee4c9cc
3ee4c9cca4d3b42fa29ad588d11f574d23c7692b
parent
56a9376f
56a9376f53e4da5126a25e694c9afdd47dfafbcc
+3
-4
1 changed file
Expand all
Collapse all
Unified
Split
expand.hs
+3
-4
expand.hs
View file
Reviewed
···
3
3
putStr $ expand cs
4
4
5
5
expand :: String -> String
6
6
-
expand cs = map translate cs
6
6
+
expand cs = concat $ map expandTab cs
7
7
8
8
-
translate :: Char -> Char
9
9
-
translate c = if c == '\t' then '@'
10
10
-
else c
8
8
+
expandTab :: Char -> String
9
9
+
expandTab c = if c == '\t' then " " else [c]