Skip to main content

🚀 In our NEW AI Bootcamp you'll build a working app in 28 days, no experience required. Free to all subscription levels.

Join the Treehouse affiliate program and earn 25% recurring commission! 🤑

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
    • All Courses
    • Tracks
    • AI Bootcamp
    • College Credit
    • Techdegree Bootcamps
    • Front End Development
    • Full Stack JavaScript
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
    • Explore
    • Career Toolbox
    • Free Treehouse Near Me
    • Affiliates
    • Blog
    • Support
    • About
    • Learn
    • Beginner's Guide to Coding
    • Data Analysis with SQL & Python
    • Front-End Web Development
    • Python Programming Basics
    • Techdegree Bootcamp Overview
    • UX Design Fundamentals
    • AI Tools for Beginners
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks AI Bootcamp College Credit
  • Techdegree Bootcamps Front End Web Development Full Stack JavaScript
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Explore Career Toolbox Free Treehouse Near Me Affiliates Blog Support About
    Learn Beginner's Guide to Coding Data Analysis with SQL & Python Front-End Web Development Python Programming Basics Techdegree Bootcamp Overview UX Design Fundamentals AI Tools for Beginners
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
Loading banner... Start your free trial at Treehouse
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
      • • Vibe Coding
  • Darcy Phillips
    Darcy Phillips
    4,087 Points

    higher order function question

    Posted November 7, 2016 7:57pm by Darcy Phillips
    Darcy Phillips
    4,087 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Review: First Class Functions

    2 Answers

  • Ronit Mankad
    Ronit Mankad
    12,166 Points

    Unknown Error!

    Posted September 29, 2016 4:55pm by Ronit Mankad
    Ronit Mankad
    12,166 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    1 Answer

  • Kevin Gutowski
    Kevin Gutowski
    4,082 Points

    Why didn't we specify what the optional parameter was for someFunction?

    Posted August 20, 2016 12:54am by Kevin Gutowski
    Kevin Gutowski
    4,082 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Functions as Data

    1 Answer

  • matt taylor
    matt taylor
    7,476 Points

    Why is this useful?

    Posted August 9, 2016 8:54pm by matt taylor
    matt taylor
    7,476 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Functions as Parameters

    0 Answers

  • john ledesma
    john ledesma
    6,944 Points

    Can someone please help me with this problem, I am not sure what is wrong. This compiles in playground.

    Posted August 9, 2016 8:23pm by john ledesma
    john ledesma
    6,944 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Functions as First Class Citizens

    0 Answers

  • Abderrahim Gdah
    Abderrahim Gdah
    1,326 Points

    i didn't understand what does it mean ?

    Posted July 23, 2016 1:16pm by Abderrahim Gdah
    Abderrahim Gdah
    1,326 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    0 Answers

  • Batuhan Ertas
    Batuhan Ertas
    1,159 Points

    can anyone say what's wrong with that code?

    Posted July 17, 2016 8:34pm by Batuhan Ertas
    Batuhan Ertas
    1,159 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    0 Answers

  • Aditya Ramabadran
    Aditya Ramabadran
    3,746 Points

    "Closest multiple of six?"

    Posted July 14, 2016 1:19am by Aditya Ramabadran
    Aditya Ramabadran
    3,746 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Extending the Int Type

    2 Answers

  • Kieran Tross
    Kieran Tross
    8,266 Points

    In an extension to the String type, add a function named modify. The modify function should accept as an argument a func

    Posted July 13, 2016 1:44am by Kieran Tross
    Kieran Tross
    8,266 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    3 Answers

  • patrick ridd
    patrick ridd
    21,011 Points

    I can't find a String.CharacterView method that returns first letter as String in the documentation. Any luck anyone?

    Posted July 12, 2016 3:15am by patrick ridd
    patrick ridd
    21,011 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    1 Answer

  • Napatchol Thaipanich
    PLUS
    Napatchol Thaipanich
    Courses Plus Student 13,534 Points

    how to do it

    Posted June 19, 2016 11:05am by Napatchol Thaipanich
    Napatchol Thaipanich
    Courses Plus Student 13,534 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    1 Answer

  • Tyler Travis
    Tyler Travis
    2,429 Points

    My code functions properly in Xcode and performs correctly but doesn't pass the test. What is going wrong?

    Posted June 18, 2016 5:28am by Tyler Travis
    Tyler Travis
    2,429 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    1 Answer

  • Tyler Travis
    Tyler Travis
    2,429 Points

    What am I doing wrong? Perhaps I am just misunderstanding the question.

    Posted June 17, 2016 7:38am by Tyler Travis
    Tyler Travis
    2,429 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    0 Answers

  • Mingzhe Zheng
    Mingzhe Zheng
    27,273 Points

    No idea how to get the first letter in String

    Posted June 16, 2016 3:35am by Mingzhe Zheng
    Mingzhe Zheng
    27,273 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    3 Answers

  • Javier Porras
    Javier Porras
    11,382 Points

    stuck on part 2 of 3 of the challenge.

    Posted June 9, 2016 6:40pm by Javier Porras
    Javier Porras
    11,382 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Returning Functions

    6 Answers

  • Javier Porras
    Javier Porras
    11,382 Points

    Stuck on task 2 of 3; extending String, and function code.

    Posted June 9, 2016 5:51pm by Javier Porras
    Javier Porras
    11,382 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    1 Answer

  • Arsene Lavaux
    Arsene Lavaux
    4,342 Points

    Extract first character of Swift String object instance using the characters property

    Posted June 4, 2016 7:46pm by Arsene Lavaux
    Arsene Lavaux
    4,342 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    2 Answers

  • Josep Bordes
    Josep Bordes
    7,752 Points

    I don't know how to use the property characters. I m using String(string.characters.first).

    Posted May 31, 2016 6:16pm by Josep Bordes
    Josep Bordes
    7,752 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    1 Answer

  • Sheng Wei
    Sheng Wei
    4,382 Points

    [Help!] Not sure how to return the characters property in this closure

    Posted May 30, 2016 8:31am by Sheng Wei
    Sheng Wei
    4,382 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    1 Answer

  • Arthur Rubio
    Arthur Rubio
    4,657 Points

    I'm having difficulty with the challenge: Write a function named addTwo, task 1 of 2

    Posted May 24, 2016 9:17pm by Arthur Rubio
    Arthur Rubio
    4,657 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Functions as First Class Citizens

    4 Answers

  • nicholasdevereaux
    nicholasdevereaux
    16,353 Points

    Closures - Challenge Task 3 of 3. How does this code know to return the first letter in a string?

    Posted May 21, 2016 11:57am by nicholasdevereaux
    nicholasdevereaux
    16,353 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    1 Answer

  • nicholasdevereaux
    nicholasdevereaux
    16,353 Points

    Closures - how to use 'characters' property without force unwrapping?

    Posted May 21, 2016 11:39am by nicholasdevereaux
    nicholasdevereaux
    16,353 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    1 Answer

  • Ignacio Opazo
    Ignacio Opazo
    8,950 Points

    Hi guys, i'm trying to get the last step in this exercise, but i stucked in this part of code...

    Posted May 16, 2016 2:06pm by Ignacio Opazo
    Ignacio Opazo
    8,950 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    1 Answer

  • khoipro
    khoipro
    10,821 Points

    I've got an issue with Closures in Swift 2's challenge

    Posted May 15, 2016 2:38pm by khoipro
    khoipro
    10,821 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    0 Answers

  • Akshay Kalbhor
    PLUS
    Akshay Kalbhor
    Courses Plus Student 725 Points

    firstLetter function in Challenge Task 2 of 3

    Posted May 12, 2016 8:07am by Akshay Kalbhor
    Akshay Kalbhor
    Courses Plus Student 725 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    1 Answer

  • Brian Cao
    Brian Cao
    1,390 Points

    what does it mean to have a function as a constant?

    Posted May 10, 2016 3:01am by Brian Cao
    Brian Cao
    1,390 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Functions as Parameters

    2 Answers

  • Johann Peters
    Johann Peters
    40,749 Points

    Something's messed up in this challenge!?

    Posted May 6, 2016 11:04am by Johann Peters
    Johann Peters
    40,749 Points
    • iOS
    • Closures in Swift 2
    • First Class Functions
    • Higher Order Functions

    3 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
SEE ALL

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
SEE ALL

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
SEE ALL

About Us

  • About
  • Blog
  • Community
  • Stories
  • Contact
  • Gift Card

Explore

  • Plans
  • Affiliates
  • Perks
  • Shop
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses

Treehouse is an online technology education platform founded in 2011. Treehouse offers more than 700 self-paced, video-based courses in web development, programming, data analysis, design, and AI, plus two project-based bootcamp programs in Front End Web Development and Full Stack JavaScript. Individual Treehouse plans start at $25 per month and include a 7-day free trial. Treehouse serves individual learners, businesses, schools, and public libraries. Cardholders at participating U.S. public libraries can use Treehouse for free. Select Treehouse courses, offered with University Pathways International, are recommended for college credit by ACE and NCCRS. Treehouse learners earn digital certificates for completed Tracks.

Terms & Conditions · Privacy · © 2026 Treehouse Island, Inc.
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
  • Discord