Student Records

Tags

Ruby

Ruby

Ruby is a dynamic, reflective, object-oriented, general-purpose programming language. Having a basic familiarity with the programming language used on the job is a prerequisite for quickly getting up to speed.

Lambda functions

Lambda functions

In computer programming, a Lambda function is an anonymous function, a function definition that is not bound to an identifier. Increasingly supported by modern and functional programming languages, Lambda functions are an important programming data structure.

Splats

Splats

A splat operator can be used to define a function with a variable number of algorithms. As a tool provided by many programming languages, it's important for developers to understand.

Public

Public

Public questions (free account) are common interview questions. They are great for practicing, or if you want to filter candidates using the classic problems.

Implement the filter method. It should accept a list of students and a variable number of filters. The filters will be passed in as lambdas, each of which will take one student record and return a boolean value.

filter should return a list of student records that have passed through all the filters.

If no filters are provided, the list of student records should be returned as is. If no students pass through all the provided filters (or if no students are provided), return an empty array.