Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Functional Programming Basics | Functional Programming in Practice
Practice
Projects
Quizzes & Challenges
Visat
Challenges
/
Functions and Functional Programming in R
close
Osio 3. Luku 2
single

single

bookChallenge: Functional Programming Basics

Pyyhkäise näyttääksesi valikon

Tehtävä

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.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 3. Luku 2
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

some-alt