haskell tag

27 questions


1 answers
74 views
0
Paths specified in yesod and APPROOT are not reflected in routing

The Yesod application configures the following:config/routes/HomeR GET POSTconfig/settings.yml host:_env:HOST:*4#any IPv4 hostport: _env:PORT:3000approot: _env:APPROOT:somedir/Accessing http://localho...

2 years ago

1 answers
93 views
0
Is there any other way to use the Haskell type operator other than the type synonym?

Recently, I've been studying Haskell for the first time and I'm just reading the library, but I have doubts about the use of the type operator.For example, in the following example, there is no right ...

2 years ago

1 answers
54 views
0
What is pattern matching in the sphere theory, is it an intermediary shot, or is it a program-specific idea?

DataHow do I access the first element of the type?As I asked you in , Haskell may only have a pattern match method to retrieve data.Example (from above link answer): dataShape=Rect Double DoublegetX(R...

2 years ago

1 answers
107 views
0
How to Test Japanese on Haskell's Doctorest

I'd like to know how to test Japanese on Haskell's doctor testmodule Main where -- | Displayed in Japanese-- >> hoge-- Japanesehoge::Stringhoge=Japanesemain ::IO()main = print hogeTesting the ab...

2 years ago

1 answers
57 views
0
How to improve the source I wrote in "Bingo Card Creation Problem"

Sorry for the vague question, but

2 years ago

1 answers
123 views
0
How can I debug memory leaks in Haskell?

Why does this code space leak? raised the following question:How can Haskell debug memory leaksThis is because in the above case, the program structure was simple, so you can identify the problem by v...

2 years ago

1 answers
107 views
0
How do I combine multiple strings using Applicative?

Application Style (++)<$>Just a<*>Just b --=Just abThis is often the case, such as (++)<$>Just a<*>Just b<*>Just c<*>...--Just abc...Would it be possible to write i...

2 years ago

1 answers
116 views
0
Haskell can't solve the codeeeval problem

ReverseWords in CodeEval cannot be solved.https://www.codeeval.com/open_challenges/8/I'd like to reverse the list in the solution.Repeat the string for the elements in the list.How do you think you ca...

2 years ago

1 answers
105 views
0
Understanding "manlen(0,0)p==n"

manlen p1p2=abs(fst p1-fst p2)+abs(snd p1-snd p2)points n = [(x,y)|x<-[-n..n], y<-[-n..n]]]circle n = [p | p <-points n, manlen(0,0)p == n ]I am not sure manlen(0,0)p==n in the last list incl...

2 years ago

2 answers
50 views
0
About isPrefixOf in haskel

In Haskell, I learned that [1,2,3] is the sugar coating syntax for 1:2:3:[].import Data.ListisPrefixOf(1:[]) (1:2:3:[])-- TrueHowever, strictly speaking, 1:[] does not appear to be prefix.1:[]:2:3:[] ...

2 years ago
« - 2 - »

© 2024 OneMinuteCode. All rights reserved.