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

Functional Programming PT1

Descrição

Functional Programming Quiz sobre Functional Programming PT1, criado por prxd33 em 25-01-2014.
prxd33
Quiz por prxd33, atualizado more than 1 year ago
prxd33
Criado por prxd33 mais de 11 anos atrás
104
0
1 2 3 4 5 (0)

Resumo de Recurso

Questão 1

Questão
let x = 2 in let y = -2 in if x^2==y^2 then 1 else 2
Responda
  • 1
  • 2
  • 3
  • 4
  • 5

Questão 2

Questão
length (words ("One Two Three" ++ "Four"))
Responda
  • 1
  • 2
  • 3
  • 4
  • 5

Questão 3

Questão
23 `mod` 8 `mod` 5
Responda
  • 1
  • 2
  • 3
  • 4
  • 5

Questão 4

Questão
head (tail [3,4,5])
Responda
  • 1
  • 2
  • 3
  • 4
  • 5

Questão 5

Questão
let x = x+3 in fst (snd (x+1,(5,x-2)))
Responda
  • 1
  • 2
  • 3
  • 4
  • 5

Questão 6

Questão
xs = [1,2,3,4,5] take 3 xs
Responda
  • reverse (tail (reverse (tail xs)))
  • tail (tail (tail xs))
  • reverse (tail (tail (reverse xs)))
  • reverse (drop 2 (reverse xs))
  • reverse (reverse (take 3 xs))

Questão 7

Questão
xs = [1,2,3,4,5] take 3 xs
Responda
  • reverse (tail (reverse (tail xs)))
  • tail (tail (tail xs))
  • reverse (tail (tail (reverse xs)))
  • reverse (drop 2 (reverse xs))
  • reverse (reverse (take 3 xs))

Questão 8

Questão
ys = [1,2,3,4] last (init ys)
Responda
  • fst (drop 2 ys)
  • reverse (init ys)
  • fst (drop 1 (reverse ys))
  • head (drop 2 ys)
  • snd (drop 2 (reverse ys))

Questão 9

Questão
xs = [1,2,3,4,5,6] reverse (init xs)
Responda
  • reverse (tail xs)
  • tail (reverse xs)
  • reverse (take 5 xs)
  • reverse (drop 1 xs)
  • drop 1 (reverse xs)

Questão 10

Questão
ys = [1,2,3,4,5] init (init (init ys))
Responda
  • take 2 ys
  • take 3 ys
  • drop 3 (reverse ys)
  • reverse (drop 3 (reverse ys))
  • reverse (tail (reverse (init ys)))

Questão 11

Questão
What is the standard prelude?
Responda
  • Contains predefined classes, types and functions, implicitly imported into every Haskell program.
  • Contains advanced I/O functions.

0 comentários

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

Semelhante

Conteúdo Geral Edital - Auditor Fiscal - Receita Federal
Alessandra S.
Poder Constituinte
Jay Benedicto
Expressões em inglês #5
Eduardo .
História da Filosofia - Período Socrático (fácil)
Daniel Vieira Inácio
Literatura - Gêneros Literários e seus Estilos
Lucas da Costa
Planejamento de Aulas: 4 Dicas de organização para Professores
Alessandra S.
Bioquímica
Luíza Cristina
2a Lei de Mendel
Andrea Barreto M. Da Poça
Sistema nervoso
João Victor