Loading [MathJax]/jax/output/HTML-CSS/fonts/TeX/fontdata.js

Functional Programming PT1

Descripción

Functional Programming Test sobre Functional Programming PT1, creado por prxd33 el 25/01/2014.
prxd33
Test por prxd33, actualizado hace más de 1 año
prxd33
Creado por prxd33 hace más de 11 años
105
0
1 2 3 4 5 (0)

Resumen del Recurso

Pregunta 1

Pregunta
let x = 2 in let y = -2 in if x^2==y^2 then 1 else 2
Respuesta
  • 1
  • 2
  • 3
  • 4
  • 5

Pregunta 2

Pregunta
length (words ("One Two Three" ++ "Four"))
Respuesta
  • 1
  • 2
  • 3
  • 4
  • 5

Pregunta 3

Pregunta
23 `mod` 8 `mod` 5
Respuesta
  • 1
  • 2
  • 3
  • 4
  • 5

Pregunta 4

Pregunta
head (tail [3,4,5])
Respuesta
  • 1
  • 2
  • 3
  • 4
  • 5

Pregunta 5

Pregunta
let x = x+3 in fst (snd (x+1,(5,x-2)))
Respuesta
  • 1
  • 2
  • 3
  • 4
  • 5

Pregunta 6

Pregunta
xs = [1,2,3,4,5] take 3 xs
Respuesta
  • reverse (tail (reverse (tail xs)))
  • tail (tail (tail xs))
  • reverse (tail (tail (reverse xs)))
  • reverse (drop 2 (reverse xs))
  • reverse (reverse (take 3 xs))

Pregunta 7

Pregunta
xs = [1,2,3,4,5] take 3 xs
Respuesta
  • reverse (tail (reverse (tail xs)))
  • tail (tail (tail xs))
  • reverse (tail (tail (reverse xs)))
  • reverse (drop 2 (reverse xs))
  • reverse (reverse (take 3 xs))

Pregunta 8

Pregunta
ys = [1,2,3,4] last (init ys)
Respuesta
  • fst (drop 2 ys)
  • reverse (init ys)
  • fst (drop 1 (reverse ys))
  • head (drop 2 ys)
  • snd (drop 2 (reverse ys))

Pregunta 9

Pregunta
xs = [1,2,3,4,5,6] reverse (init xs)
Respuesta
  • reverse (tail xs)
  • tail (reverse xs)
  • reverse (take 5 xs)
  • reverse (drop 1 xs)
  • drop 1 (reverse xs)

Pregunta 10

Pregunta
ys = [1,2,3,4,5] init (init (init ys))
Respuesta
  • take 2 ys
  • take 3 ys
  • drop 3 (reverse ys)
  • reverse (drop 3 (reverse ys))
  • reverse (tail (reverse (init ys)))

Pregunta 11

Pregunta
What is the standard prelude?
Respuesta
  • Contains predefined classes, types and functions, implicitly imported into every Haskell program.
  • Contains advanced I/O functions.
Mostrar resumen completo Ocultar resumen completo

0 comentarios

There are no comments, be the first and leave one below:

Similar

Test de Geografía
maya velasquez
test de antropologia Social
pedro zambrano olivares
La prehistoria
Remei Gomez Gracia
Cinemática
maya velasquez
Partes de la célula animal y vegetal
Cami Puaque
MATEMÁTICAS: ARITMÉTICA...
Ulises Yo
FGM-12. MANIFESTACIONES EXTERNAS DE LA DISCIPLINA
antonio del valle
Test Ciclo celular
valentina marchant
SEMIOLOGIA PSIQUIATRICA DE LA PERCEPCION
Nicolas Oliveros0691
Las Alteraciones
mariajesus camino