Questions tagged as 'haskell'

1
answer

Test functions you create in Haskell

You will see an ubuntu emulator installed 1 year ago and now that I am studying in the faculty we do functions in haskell and they will see, I forget how to try the functions that I create in the .hs file and test them in the haskell terminal....
asked by 22.09.2018 / 23:10
1
answer

hello could you give me a hand with exercise in haskell

Hello, I am stuck in the following exercise of a haskell beginner course: Having the following functions: maximoEntreTres uno dos tres = max uno (max dos tres) minimoEntreTres uno dos tres = min uno (min dos tres) dispersion uno dos tr...
asked by 16.09.2018 / 06:06
1
answer

Increase a variable of type data Microprocessor

They ask me not to repeat this logic pC microprocesador + 1 I can not think of an idea of how to do it, I think they ask me to somehow autoincrement. data Microprocesador = Microprocesador { nombre :: String, memory :: [Int], a ::...
asked by 18.04.2018 / 18:40
2
answers

Periodicity of a list in Haskell

I need to create a function in Haskell, that works in the following way periodicidad :: [Integer] -> [Integer] periodicidad [1,2,3,4,1,2,3,4...] = [1,2,3,4] periodicidad [0,1,2,5,4,3,0,1,2,5,4...] = [0,1,2,5,4,3] That is to say, that fro...
asked by 10.02.2018 / 19:43
1
answer

Calculate Intenes roots of Integer in Haskell

I need a function that does the following raizEnesima :: Integer -> Integer -> Integer raizEnesima 8 3 == 2 raizEnesima 7 8 == 1 raizEnesima 4 2 == 2 I have tried to perform the function, in the following way, but it gives me an erro...
asked by 17.01.2018 / 19:55
1
answer

Haskell how to transform a Char list into a Matrix?

My goal is the following: They give me a list of Char, for example: ["++++.++++.++."] What I want to achieve is to separate that list into small lists (put together a matrix) of Whole numbers, where each positive number will represent th...
asked by 24.11.2017 / 20:13
1
answer

Convert a String list to an integer list list in haskell

I have this list ["0 1 1 0","1 0 1 0","1 1 0 1","0 0 1 0"] and I want to convert every position of that list into a list of integers ie [[0110],[1010],[1101],[0010]]     
asked by 17.06.2017 / 20:37
1
answer

how can I delete repeated items from a list?

If I have this list [a,b,c,d] y esta otra [a,b,c,a,c,b,d,a,d,c] How can I delete the repeated elements from this list [a,b,c,a,c,b,d,a,d,c] so that I stay like this [a,b,c,d]     
asked by 26.06.2017 / 17:14
0
answers

Use sort to order lists in Haskell

My question today arose because I was told that in haskell you can sort a list, and at the same time delete the repeated ones using the method sort(listaRecibida,listaOrdenada) My problem is that I do not find how to put it in t...
asked by 14.11.2018 / 21:27
1
answer

How can I make a length of a list in haskell not tell me the repeated ones?

I need to solve a problem in haskell where it asks me that the function (let's call it func1) receives a list and a maximum price (which is related to the elements of the list), and counts the elements that are not repeated. . The list it...
asked by 10.11.2018 / 20:00