Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Challenge: Functional Programming Basics | Functional Programming in Practice
Functions and Functional Programming in R

bookChallenge: Functional Programming Basics

Tarefa

Swipe to start coding

Write a function apply_function_to_vector that takes a vector and a function as arguments, and applies the function to each element of the vector, returning the results.

  • The function must accept two arguments: a vector (vec) and a function (fun).
  • The function must apply fun to each element of vec.
  • The function must return a vector containing the results.

Solução

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 2
single

single

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

close

bookChallenge: Functional Programming Basics

Deslize para mostrar o menu

Tarefa

Swipe to start coding

Write a function apply_function_to_vector that takes a vector and a function as arguments, and applies the function to each element of the vector, returning the results.

  • The function must accept two arguments: a vector (vec) and a function (fun).
  • The function must apply fun to each element of vec.
  • The function must return a vector containing the results.

Solução

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 2
single

single

some-alt