...

/

Challenge: Manipulating Hash Maps

Challenge: Manipulating Hash Maps

Complete the challenge using what you've learned about destructuring and arity.

We'll cover the following...

Explanation

Until now, you’ve only done mathematical challenges. Now you’ll want to take a different approach. Imagine that you’re doing a job for a school, and they send you a list with students’ information.

You can see the list below. The given list structure will be your entry point argument for all the exercises.

(def students [{:name "Andy"
:age 10
:gender :male
:parents [{:name "Clara"
:relation :mother}
{:name "Kevin"
:relation :father}]}
{:name "Beth"
:age 11
:gender :female
:parents [{:name "Travis"
:relation :father}
{:name "Michael"
:relation :father}]}
{:name "Cindy"
:age 10
:gender :female
:parents [{:name "Marie"
:relation :mother}
{:name "John"
:relation :father}]}
{:name "Liz"
:age 11
:gender :female
:parents [{:name "Lanna"
:relation :mother}
{:name "Lourdes"
:relation :mother}]}
{:name "Anna"
:age 10
:gender :female
:parents [{:name "Paola"
:relation :mother}
{:name "Lucas"
:relation :father}]}
{:name "Howard"
:age 10
:gender :male
:parents [{:name "Fernanda"
:relation :mother}
{:name "Abel"
:relation :father}]}
{:name "Johnny"
:age 11
:gender :male
:parents [{:name "Marianne"
:relation :mother}
{:name "Raphael"
:relation :father}]}
{:name "Lara"
:age 11
:gender :female
:parents [{:name "Helouise"
:relation :mother}
{:name "Barbara"
:relation :mother}]}
{:name "Kelvin"
:age 10
:gender :male
:parents [{:name "Pamela"
:relation :mother}
{:name "Lincoln"
:relation :father}]}
{:name "Camille"
:age 11
:gender :female
:parents [{:name "Lourdes"
:relation :mother}
{:name "Matheus"
:relation :father}]}
{:name "Bruno"
:age 10
:gender :male
:parents [{:name "Camu"
:relation :mother}
{:name "George"
:relation :father}]}
{:name "Lina"
:age 11
:gender :female
:parents [{:name "Claudia"
:relation :mother}
{:name "Klaus"
:relation :father}]}
{:name "Gabrielle"
:age 11
:gender :female
:parents [{:name "Natalie"
:relation :mother}
{:name "Matheus"
:relation :father}]}
{:name "Lucas"
:age 10
:gender :male
:parents [{:name "Pamela"
:relation :mother}
{:name "George"
:relation :father}]}])

Each student will have the following parameters:

  • name: This is a String with the name of the student.

  • age: This is an Integer with the age of the student.

  • gender: This is a keyword that can only be ...