{"id":33232259,"url":"https://github.com/isemenkov/pascalutils","last_synced_at":"2025-12-06T02:01:39.075Z","repository":{"id":46339412,"uuid":"283261101","full_name":"isemenkov/pascalutils","owner":"isemenkov","description":"PascalUtils is an object library for delphi and FreePascal of data structures that implements syntactic sugar similar to that of other modern languages as far as syntax allows.","archived":false,"fork":false,"pushed_at":"2022-01-22T18:32:22.000Z","size":138,"stargazers_count":24,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-02-01T15:03:59.841Z","etag":null,"topics":["data-structures","delphi","delphi-library","delphi10","fpc","freepascal","pascal","pascal-library","pascalutils"],"latest_commit_sha":null,"homepage":"","language":"Pascal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/isemenkov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-28T15:59:51.000Z","updated_at":"2023-03-02T21:10:53.000Z","dependencies_parsed_at":"2022-07-19T22:08:19.850Z","dependency_job_id":null,"html_url":"https://github.com/isemenkov/pascalutils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/isemenkov/pascalutils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isemenkov%2Fpascalutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isemenkov%2Fpascalutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isemenkov%2Fpascalutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isemenkov%2Fpascalutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/isemenkov","download_url":"https://codeload.github.com/isemenkov/pascalutils/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/isemenkov%2Fpascalutils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27533116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-06T02:00:06.463Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-structures","delphi","delphi-library","delphi10","fpc","freepascal","pascal","pascal-library","pascalutils"],"created_at":"2025-11-16T18:00:21.983Z","updated_at":"2025-12-06T02:01:39.066Z","avatar_url":"https://github.com/isemenkov.png","language":"Pascal","readme":"PascalUtils\n==========\n\nPascalUtils is an object library for delphi and FreePascal of data structures that implements syntactic sugar similar to that of other modern languages as far as syntax allows.\n\n\n### Table of contents\n\n* [Requierements](#requirements)\n* [Installation](#installation)\n* [Usage](#usage)\n* [Data structures](#data-structures)\n  * [TAny](#tany)\n  * [TOptional](#toptional)\n  * [TResult](#tresult)\n  * [TVoidResult](#tvoidresult)\n  * [TDataSize](#tdatasize)\n  * [TTimeInterval](#ttime-interval)\n  * [TPair](#tpair)\n  * [TTuple](#ttuple)\n  * [TVariant](#tvariant)\n  * [TUnaryFunctor](#tunaryfunctor) \n  * [TBinaryFunctor](#tbinaryfunctor)\n    * [TUnsortableFunctor](#tunsortablefunctor)\n    * [TDefaultCompareFunctor](#tdefaultcomparefunctor)\n    * [TDefaultLessFunctor](#tdefaultlessfunctor)\n    * [TDefaultGreaterFunctor](#tdefaultgreaterfunctor)\n    * [TDefaultEqualFunctor](#tdefaultequalfunctor)\n    * [TDefaultPairKeyCompareFunctor](#tdefaultpairkeycomparefunctor)\n  * [API.CString](#apicstring)\n* [Errors processing](#errors-processing)\n  * [TArrayErrorsStack](#tarrayerrorsstack)\n  * [TListErrorsStack](#tlisterrorsstack)\n* [Iterators](#iterators)\n  * [TForwardIterator](#tforwarditerator) \n  * [TBidirectionalIterator](#tbidirectionaliterator)\n  * [TEnumerator](#tenumerator)\n  * [TFilterEnumerator](#tfilterenumerator)\n  * [TAccumulate](#taccumulate)\n  * [TMap](#tmap)\n\n\n\n### Requirements\n\n* [Embarcadero (R) Rad Studio](https://www.embarcadero.com)\n* [Free Pascal Compiler](http://freepascal.org)\n* [Lazarus IDE](http://www.lazarus.freepascal.org/)\n\n\n\nLibrary is tested for \n\n- Embarcadero (R) Delphi 10.3 on Windows 7 Service Pack 1 (Version 6.1, Build 7601, 64-bit Edition)\n- Embarcadero (R) Delphi 11.0 Version 28.0.42600.6491 on Windows 10 (Version 10.0, Build 19042, 64-bit Edition)\n- FreePascal Compiler (3.2.0) and Lazarus IDE (2.0.10) on Ubuntu Linux 5.8.0-33-generic x86_64\n\n\n\n### Installation\n\n\nGet the sources and add the *source* directory to the project search path.  For FPC add the *source* directory to the *fpc.cfg* file.\n\n\n\n### Usage\n\nClone the repository `git clone https://github.com/isemenkov/pascalutils`.\n\nAdd the unit you want to use to the `uses` clause.\n\n\n\n### Data structures\n\n#### TAny\n[TAny](https://github.com/isemenkov/pascalutils/blob/master/source/utils.any.pas) class describes a type-safe container for single value.\n\n```pascal\nuses\n  utils.any;\n\ntype\n  generic TAny\u003cT\u003e = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TAny#create)\n  * [Value](https://github.com/isemenkov/pascalutils/wiki/TAny#value)\n\n\n\n#### TOptional\n\n[TOptional](https://github.com/isemenkov/pascalutils/blob/master/source/utils.optional.pas) class represents an optional value: every TOptional is contains a value, or does not, like in Rust lang.\n\n```pascal\nuses\n  utils.optional;\n \ntype\n  generic TOptional\u003cT\u003e = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TOptional#create)\n  * [IsSome](https://github.com/isemenkov/pascalutils/wiki/TOptional#issome)\n  * [Unwrap](https://github.com/isemenkov/pascalutils/wiki/TOptional#unwrap)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TOptional).\n\n\n\n#### TResult\n\nResult types typically contain either a returned value or an error, and could provide first-class encapsulation of the common (value, err) pattern ubiquitous throughout Go programs.\n\n```pascal\nuses\n  utils.result;\n  \ntype\n  generic TResult\u003cV, E\u003e = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TResult#create)\n  * [IsOk](https://github.com/isemenkov/pascalutils/wiki/TResult#isok)\n  * [IsErr](https://github.com/isemenkov/pascalutils/wiki/TResult#iserr)\n  * [Value](https://github.com/isemenkov/pascalutils/wiki/TResult#value)\n  * [Error](https://github.com/isemenkov/pascalutils/wiki/TResult#error)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TResult).\n\n\n\n#### TVoidResult\n\nTVoidResult contains Ok flag or error type like in GO or Rust languages. It is a specialized TResult type with no value.\n\n```pascal\nuses\n  utils.result;\n  \ntype\n  generic TVoidResult\u003cE\u003e = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TVoidResult#create)\n  * [IsOk](https://github.com/isemenkov/pascalutils/wiki/TVoidResult#isok)\n  * [IsErr](https://github.com/isemenkov/pascalutils/wiki/TVoidResult#iserr)\n  * [Error](https://github.com/isemenkov/pascalutils/wiki/TVoidResult#error)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TVoidResult).\n\n\n\n#### TDataSize\n\n[TDataSize](https://github.com/isemenkov/pascalutils/blob/master/source/utils.datasize.pas) class provide the interface to manipulate data sizes.\n\n```pascal\nuses\n  utils.datasize;\n\ntype\n  TDataSize = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TDataSize#create)\n  * [Values](https://github.com/isemenkov/pascalutils/wiki/TDataSize#values)\n  * [Convert](https://github.com/isemenkov/pascalutils/wiki/TDataSize#convert)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TDataSize).\n\n\n\n#### TTimeInterval\n\n[TTimeInterval](https://github.com/isemenkov/pascalutils/blob/master/source/utils.timeinterval.pas) class provide the interface to manipulate time intervals.\n\n```pascal\nuses\n  utils.timeinterval;\n\ntype\n  TTimeInterval = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TTimeInterval#create)\n  * [Values](https://github.com/isemenkov/pascalutils/wiki/TTimeInterval#values)\n  * [Convert](https://github.com/isemenkov/pascalutils/wiki/TTimeInterval#convert)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TTimeInterval).\n\n\n\n#### TPair\n\n[TPair](https://github.com/isemenkov/pascalutils/blob/master/source/utils.pair.pas) class couples together a pair of values, which may be of different types (T1 and T2). The individual values can be accessed through its public members first and second, like in C++ language.\n\n```pascal\n\nuses\n  utils.pair;\n\ntype\n  generic TPair\u003cT1, T2\u003e = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TPair#create)\n  * [First](https://github.com/isemenkov/pascalutils/wiki/TPair#first)\n  * [Second](https://github.com/isemenkov/pascalutils/wiki/TPair#second)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TPair).\n\n\n\n#### TTuple\n\n[TTuple](https://github.com/isemenkov/pascalutils/blob/master/source/utils.tuple.pas) is an object capable to hold a collection of elements. Each element can be of a different type, like in C++ language.\n\n```pascal\n\nuses\n  utils.tuple;\n\ntype\n  generic TTuple3\u003cT1, T2, T3\u003e = class\n  generic TTuple4\u003cT1, T2, T3, T4\u003e = class\n  generic TTuple5\u003cT1, T2, T3, T4, T5\u003e = class\n  generic TTuple6\u003cT1, T2, T3, T4, T5, T6\u003e = class\n  generic TTuple7\u003cT1, T2, T3, T4, T5, T6, T7\u003e = class\n  generic TTuple8\u003cT1, T2, T3, T4, T5, T6, T7, T8\u003e = class\n  generic TTuple9\u003cT1, T2, T3, T4, T5, T6, T7, T8, T9\u003e = class\n  generic TTuple10\u003cT1, T2, T3, T4, T5, T6, T7, T8, T9, T10\u003e = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TTuple#create)\n  * [First](https://github.com/isemenkov/pascalutils/wiki/TTuple#first)\n  * [Second](https://github.com/isemenkov/pascalutils/wiki/TTuple#second)\n  * [Third](https://github.com/isemenkov/pascalutils/wiki/TTuple#third)\n  * [Fourth](https://github.com/isemenkov/pascalutils/wiki/TTuple#fourth)\n  * [Fifth](https://github.com/isemenkov/pascalutils/wiki/TTuple#fifth)\n  * [Sixth](https://github.com/isemenkov/pascalutils/wiki/TTuple#sixth)\n  * [Seventh](https://github.com/isemenkov/pascalutils/wiki/TTuple#sevent)\n  * [Eighth](https://github.com/isemenkov/pascalutils/wiki/TTuple#eighth)\n  * [Ninth](https://github.com/isemenkov/pascalutils/wiki/TTuple#ninth)\n  * [Tenth](https://github.com/isemenkov/pascalutils/wiki/TTuple#tenth)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TTuple).\n\n\n\n#### TVariant\n\n[TVariant](https://github.com/isemenkov/pascalutils/blob/master/source/utils.variant.pas) is class template which represents a type-safe union. An instance of TVariant at any given time either holds a value of one of its alternative types.\n\n```pascal\n\nuses\n  utils.variant;\n\ntype\n  generic TVariant2\u003cT1, T2\u003e = class\n  generic TVariant3\u003cT1, T2, T3\u003e = class\n  generic TVariant4\u003cT1, T2, T3, T4\u003e = class\n  generic TVariant5\u003cT1, T2, T3, T4, T5\u003e = class\n  generic TVariant6\u003cT1, T2, T3, T4, T5, T6\u003e = class\n  generic TVariant7\u003cT1, T2, T3, T4, T5, T6, T7\u003e = class\n  generic TVariant8\u003cT1, T2, T3, T4, T5, T6, T7, T8\u003e = class\n  generic TVariant9\u003cT1, T2, T3, T4, T5, T6, T7, T8, T9\u003e = class\n  generic TVariant10\u003cT1, T2, T3, T4, T5, T6, T7, T8, T9, T10\u003e = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TVariant#create)\n  * [GetType](https://github.com/isemenkov/pascalutils/wiki/TVariant#gettype)\n  * [GetValue](https://github.com/isemenkov/pascalutils/wiki/TVariant#getvalue)\n  * [SetValue](https://github.com/isemenkov/pascalutils/wiki/TVariant#setvalue)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TVariant).\n\n\n\n#### TUnaryFunctor\n\nFunctor is instance of a class with member function `Call` defined. This member function allows the object to be used with the  same syntax as a regular function call, and therefore its type can be  used as template parameter when a generic function type is expected.\n\n```pascal\nuses\n  utils.functor;\n  \ntype\n  generic TUnaryFunctor\u003cV, R\u003e = class\n```\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TUnaryFunctor).\n\n\n\n#### TBinaryFunctor\n\nFunctor is instance of a class with member function `Call` defined. This member function allows the object to be used with the  same syntax as a regular function call, and therefore its type can be  used as template parameter when a generic function type is expected.\n\n```pascal\nuses\n  utils.functor;\n  \ntype\n  generic TBinaryFunctor\u003cV, R\u003e = class\n```\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TBinaryFunctor).\n\n\n\n##### TUnsortablefunctor\n\nIt is a special compare functor that return 0 (zero) all times. Real values not used. This functor can be used for [containers](https://github.com/isemenkov/libpasc-algorithms/wiki) for unsortable values.\n\n```pascal\nuses\n  utils.functor;\n\ntype  \n  TUnsortableFunctor = \n    class({$IFDEF FPC}specialize{$ENDIF} TBinaryFunctor\u003cV, Integer\u003e);\n```\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TBinaryFunctor#tunsortablefunctor).\n\n\n\n##### TDefaultCompareFunctor\n\nIt is a functor which return a negative value if AValue1 should be sorted before AValue2, a positive value if AValue1 should be sorted after AValue2, zero if AValue1 and AValue2 are equal.\n\n```pascal\nuses\n  utils.functor;\n  \ntype\n  generic TDefaultCompareFunctor\u003cV\u003e = \n    class({$IFDEF FPC}specialize{$ENDIF} TBinaryFunctor\u003cV, Integer\u003e)\n  public\n    function Call(AValue1, AValue2 : V) : Integer;\n  end;\n```\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TBinaryFunctor#tdefaultcomparefunctor).\n\n\n\n##### TDefaultLessFunctor\n\nIt is a functor which return True if AValue1 \u003c AValue2.\n\n```pascal\nuses\n  utils.functor;\n  \ntype\n  generic TDefaultLessFunctor\u003cV\u003e =\n    class ({$IFDEF FPC}specialize{$ENDIF} TBinaryFunctor\u003cV, Boolean\u003e);\n```\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TBinaryFunctor#tdefaultlessfunctor).\n\n\n\n##### TDefaultGreaterFunctor\n\nIt is a functor which return True if AValue1 \u003e AValue2.\n\n```pascal\nuses\n  utils.functor;\n  \ntype\n  generic TDefaultGreaterFunctor\u003cV\u003e =\n    class ({$IFDEF FPC}specialize{$ENDIF} TBinaryFunctor\u003cV, Boolean\u003e);\n```\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TBinaryFunctor#tdefaultgreaterfunctor).\n\n\n\n##### TDefaultEqualFunctor\n\nIt is a functor which return True if AValue1 = AValue2.\n\n```pascal\nuses\n  utils.functor;\n  \ntype\n  generic TDefaultEqualFunctor\u003cV\u003e =\n    class ({$IFDEF FPC}specialize{$ENDIF} TBinaryFunctor\u003cV, Boolean\u003e);\n```\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TBinaryFunctor#tdefaultequalfunctor).\n\n\n\n##### TDefaultPairKeyCompareFunctor\n\nIt is a functor which return a negative value if pair 1 key should be sorted before pair 2 key, a positive value if pair 1 key should be sorted after pair 2 key, zero if pair 1 key and pair 2 key are equal.\n\n```pascal\nuses\n  utils.functor, utils.pair;\n  \nuses\n  generic TDefaultPairKeyCompareFunctor\u003cK, V\u003e =\n    class({$IFDEF FPC}specialize{$ENDIF} TBinaryFunctor\n    \u003c{$IFDEF FPC}specialize{$ENDIF} TPair\u003cK, V\u003e, Integer\u003e)\n```\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TBinaryFunctor#tdefaultpairkeycomparefunctor).\n\n\n\n### API.CString\n\nAPI.CString is a wrapper around C language API cstring `char *` value.\n\n```pascal\nuses\n  utils.api.cstring;\n  \ntype\n  API = class\n  type\n    CString = class\n  end;\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/API.CString#create)\n  * [ToString](https://github.com/isemenkov/pascalutils/wiki/API.CString#tostring)\n  * [ToPAnsiChar](https://github.com/isemenkov/pascalutils/wiki/API.CString#topansichar)\n  * [ToUniquePAnsiChar](https://github.com/isemenkov/pascalutils/wiki/API.CString#touniquepansichar)\n  * [Length](https://github.com/isemenkov/pascalutils/wiki/API.CString#length)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/API.CString).\n\n\n\n### Errors processing\n\n#### TArrayErrorsStack\n\n[TArrayErrorsStack](https://github.com/isemenkov/pascalutils/blob/master/source/utils.errorsstack.pas) is generic stack over array of T which contains errors codes.\n\n```pascal\nuses\n  utils.errorsstack;\n\ntype\n  generic TArrayErrorsStack\u003cT\u003e = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TArrayErrorsStack#create)\n  * [Push](https://github.com/isemenkov/pascalutils/wiki/TArrayErrorsStack#push)\n  * [Pop](https://github.com/isemenkov/pascalutils/wiki/TArrayErrorsStack#pop)\n  * [Count](https://github.com/isemenkov/pascalutils/wiki/TArrayErrorsStack#count)\n  * [Iterate](https://github.com/isemenkov/pascalutils/wiki/TArrayErrorsStack#iterate)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TArrayErrorsStack).\n\n\n\n#### TListErrorsStack\n\n[TListErrorsStack](https://github.com/isemenkov/pascalutils/blob/master/source/utils.errorsstack.pas) is generic stack over list of T classes which contains errors codes.\n\n```pascal\nuses\n  utils.errorsstack;\n\ntype\n  generic TListErrorsStack\u003cT\u003e = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TListErrorsStack#create)\n  * [Push](https://github.com/isemenkov/pascalutils/wiki/TListErrorsStack#push)\n  * [Pop](https://github.com/isemenkov/pascalutils/wiki/TListErrorsStack#pop)\n  * [Count](https://github.com/isemenkov/pascalutils/wiki/TListErrorsStack#count)\n  * [Iterate](https://github.com/isemenkov/pascalutils/wiki/TListErrorsStack#iterate)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TListErrorsStack).\n\n\n\n### Iterators\n\n\n\n#### TForwardIterator\n\n[TForwardIterator](https://github.com/isemenkov/pascalutils/blob/master/source/utils.enumerate.pas) is a base class for custom forward direction iterators.\n\n```pascal\nuses\n  utils.enumerate;\n\ntype\n  generic TForwardIterator\u003cV, Iterator\u003e = class\n```\n\n  * [HasValue](https://github.com/isemenkov/pascalutils/wiki/TForwardIterator#hasvalue)\n  * [Next](https://github.com/isemenkov/pascalutils/wiki/TForwardIterator#next)\n  * [MoveNext](https://github.com/isemenkov/pascalutils/wiki/TForwardIterator#movenext)\n  * [GetEnumerator](https://github.com/isemenkov/pascalutils/wiki/TForwardIterator#geenumerator)\n  * [GetValue](https://github.com/isemenkov/pascalutils/wiki/TForwardIterator#gevalue)\n  * [GetCurrent](https://github.com/isemenkov/pascalutils/wiki/TForwardIterator#getcurrent)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TForwardIterator).\n\n\n\n#### TBidirectionalIterator\n\n[TBidirectionalIterator](https://github.com/isemenkov/pascalutils/blob/master/source/utils.enumerate.pas) is a base class for custom forward and backward directions iterators.\n\n```pascal\nuses\n  utils.enumerate;\n\ntype\n  generic TBidirectionalIterator\u003cV, Iterator\u003e = class\n```\n\n  * [HasValue](https://github.com/isemenkov/pascalutils/wiki/TBidirectionalIterator#hasvalue)\n  * [Next](https://github.com/isemenkov/pascalutils/wiki/TBidirectionalIterator#next)\n  * [Prev](https://github.com/isemenkov/pascalutils/wiki/TBidirectionalIterator#prev)\n  * [MoveNext](https://github.com/isemenkov/pascalutils/wiki/TBidirectionalIterator#movenext)\n  * [GetEnumerator](https://github.com/isemenkov/pascalutils/wiki/TBidirectionalIterator#geenumerator)\n  * [GetValue](https://github.com/isemenkov/pascalutils/wiki/TBidirectionalIterator#gevalue)\n  * [GetCurrent](https://github.com/isemenkov/pascalutils/wiki/TBidirectionalIterator#getcurrent)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TBidirectionalIterator).\n\n\n\n#### TEnumerator\n\n[TEnumerator](https://github.com/isemenkov/pascalutils/blob/master/source/utils.enumerate.pas) class adds counter to an iterable objects what have iterator based on [TForwardIterator](https://github.com/isemenkov/pascalutils/wiki/TForwardIterator) or [TBidirectionalIterator](https://github.com/isemenkov/pascalutils/wiki/TBidirectionalIterator) and returns it (the enumerate object) like in a Python language.\n\n\n```pascal\nuses\n  utils.enumerate;\n\ntype\n  generic TEnumerator\u003cV, Iterator\u003e = class\n```\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TEnumerator#create)\n  * [Iterate](https://github.com/isemenkov/pascalutils/wiki/TEnumerator#iterate)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TEnumerator).\n\n\n\n#### TFilterEnumerator\n\n[TFilterEnumerator](https://github.com/isemenkov/pascalutils/blob/master/source/utils.enumerate.pas) class provides filtering enumerator by UnaryFunctor.\n\n```pascal\nuses\n  utils.enumerate, utils.functor;\n\ntype\n  generic TFilterEnumerator\u003cV, Iterator, Functor\u003e = class\n```\nFunctor is based on [utils.functor.TUnaryFunctor](https://github.com/isemenkov/pascalutils/wiki/TUnaryFunctor) interface and used to filtering item value.\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TFilterEnumerator#create)\n  * [Iterate](https://github.com/isemenkov/pascalutils/wiki/TFilterEnumerator#iterate)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TFilterEnumerator).\n\n\n\n#### TAccumulate\n\n[TAccumulate](https://github.com/isemenkov/pascalutils/blob/master/source/utils.functional.pas) accumulated values using binary functions (specified via the Functor argument).\n\n```pascal\nuses\n  utils.functional, utils.functor;\n\ntype\n  generic TAccumulate\u003cV, Iterator, Functor\u003e = class\n```\nFunctor is based on [utils.functor.TBinaryFunctor](https://github.com/isemenkov/pascalutils/wiki/TBinaryFunctor) interface and used to accumulate the result value.\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TAccumulate#create)\n  * [Value](https://github.com/isemenkov/pascalutils/wiki/TAccumulate#value)\n  * [Default addition functors](https://github.com/isemenkov/pascalutils/wiki/TAccumulate#default-addition-functors)\n  * [Default multiplication functors](https://github.com/isemenkov/pascalutils/wiki/TAccumulate#default-multiplication-functors)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TAccumulate).\n\n\n\n#### TMap\n\n[TMap](https://github.com/isemenkov/pascalutils/blob/master/source/utils.functional.pas) applying the given functor to each item of a given iterable object).\n\n```pascal\nuses\n  utils.functional, utils.functor;\n\ntype\n  generic TMap\u003cV, Iterator, Functor\u003e = class\n```\nFunctor is based on [utils.functor.TUnaryFunctor](https://github.com/isemenkov/pascalutils/wiki/TUnaryFunctor) interface and used to modify item value.\n\n  * [Create](https://github.com/isemenkov/pascalutils/wiki/TMap#create)\n  * [Iterate](https://github.com/isemenkov/pascalutils/wiki/TMap#iterate)\n\n*More details read on* [wiki page](https://github.com/isemenkov/pascalutils/wiki/TMap).","funding_links":[],"categories":["Other non-visual"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisemenkov%2Fpascalutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fisemenkov%2Fpascalutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fisemenkov%2Fpascalutils/lists"}