Giter Site home page Giter Site logo

filterlistocaml's Introduction

Filter Operation on a list

A simple filter operation on a list in OCaml

Folder Structure

ocaml_project/
|-- main.ml             (* Main source file containing the program logic *)
|-- test_cases.ml       (* Test suite for the project *)
|-- dune
|-- dune-project        (* Project metadata file *)
|-- README.md           (* Project documentation or README file *)

The Program Logic

The program does the following: 1.Accepts a list of integers as input. 2.Raises an error message if the length of the input list is not a multiple of 10. 3.Returns or displays a list of integers derived from the input list. Items at positions that are multiples of both 2 and 3 are removed from the result.

The Test Suite:

To test the written program icludes the following test cases

  1. Valid output on valid input
  2. If the list length is not a multiple of 10
  3. Empty list

Test Results

After running dune runtest in the respectcive folder will get the following result: Test Suite Results

filterlistocaml's People

Contributors

iiitm-jay avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.