Git Product home page Git Product logo

cpo-lab3's Introduction

Computer Process Organization

Lab3

Title:

Computational Process Organization Lab3,variant 1

List of group members:

  • Name:Liu Honggang, student number:202320048
  • Name:Fu wei, student number:202320049

Laboratory work number:

Lab3 variant 1

Description:

variant 1: In this variant, you should implement a lazy library for a single-linked list. For that, you should use closures. Usage of generators (yield statement) or async (async, await statements) is not allowed.

Synopsis:

implement the following API:

  • head(List) – return a list first element. If the list is empty – raise an exception.
  • tail(List) – return tail of the list.
  • length(List).
  • map(List, Function) and reduce(List, Function, InitialState).
  • mempty().
  • mconcat(List1, List2) – should not force list evaluation.
  • from_list(pythonList) and to_list(List).
  • it should be an iterator.
  • Complex test – factorial    - To proof correctness, use unit tests, properties-based tests    - To proof laziness,demonstrate it for all suitable implemented functions on an infinite list (e.g. natural numbers sequence) and a

contribution

  • contribution summary for each group member (should be checkable by git log and git blame);
    • Linkedlist:Liu honggang
    • Linkedlist_test:Fu wei

Explanation:

we create a single-linked list and use closures.And we not use generators (yield statement) or async (async, await statements).

Work demonstration

  • (how to use developed software, how to test it), should be repeatable by an instructor by given command-line examples:
    • We write Linkedlist file and test file on Pycharm.
    • Use terminal to test the code. like 'python Linkedlist.py -v'and 'python Linkedlist_test.py -v'.

Conclusion:

We create a single-linked list and use closures.It's easy to see the test result.

cpo-lab3's People

Contributors

ikun-beautiful 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.