iterator   491

« earlier    

Using async iteration natively in Node.js
async function main(inputFilePath) {
const readStream = fs.createReadStream(inputFilePath,
{ encoding: 'utf8', highWaterMark: 1024 });

for await (const chunk of readStream) {
console.log('>>> '+chunk);
}
console.log('### DONE ###');
}
async  iterator  iteration  node.js  streams  streaming 
6 days ago by nharbour
Iterators and Streams in Rust and Haskell
Both Rust and Haskell have their own approaches for modeling streaming data. But what does it look like when we try to share these approaches between languages?
rust  haskell  c  iterator  performance  benchmark  4* 
january 2018 by ianweatherhogg
`for-await-of` and synchronous iterables
This blog post describes how `for-await-of` handles synchronous iterables. `for-await-of` is a core construct of asynchronous iteration. You can read up on it in the blog post “ES proposal: asynchronous iteration”.
async  stream  streams  node.js  iteration  iterator 
december 2017 by nharbour
stl - Iterate keys in a C++ map - Stack Overflow
What's difficult to discern from the STL documentation at, say, cppreference.com, is that the allocator is a std::pair. That gives you the clue that instead of "key" and "value" you need to be saying "it->first" and "it->second" when looping over the elements with a std::iterator.
cplusplus  stl  iterator  map  syntax  solution 
november 2017 by kme
How to write a Rust function that takes an iterator? - Stack Overflow
You want to use generics here:

fn find_min<'a, I>(vals: I) -> Option<&'a u32>
where I: Iterator<Item=&'a u32>
{
vals.min()
}
rust  Iterator 
october 2017 by joux

« earlier    

related tags

4*  :vos:toimplement  adf  advanced  algorithm  algorithms  allocation  amazon  angularjs  apache  api  array  article  async  await  aws  base  benchmark  bigdata  bindings  blacklocus  blog  break  c++  c  caching  class  cli  clojure  close  code  coding  collection  collections  computing  console  container  cplusplus  cpp  custom  cycle  cython  data  delete  delicious  designpattern  dev  devel  development  django  documentation  dotnet  ecmascript  education  efficient-algorithm  entryset  enumerator  epoll  erase  error  es6  es7  esnext  ev++  event  example  explanation  external  fix  floss  fluentiterable  for  for_loop  foreach  forms  forum  fp  frontend  function  functional-programming  functional  g++  generator  generators  generics  go  golang  good  graphs  groovy  guava  guide  haskell  howto  ideas  important  interface  internal  interop  issue  item  items  iterable  iterables  iterate  iteratee  iterating  iteration  iterator_to_array  iterators  itertool  java  javascript  javtr  js  jsperf  julia  key  kotlin  libev  libevent  libraries  library  list  loop  looping  loops  manual  map  mdn  memory  message  meta  mono  mutable  node.js  npm  object  observable  oo  oop  opensource  paginator  pattern  patterns  peek  performance  php  php5  pitfalls  poll  postgres  presentation  programing  programmin  programming  promise  promises  protocol  psycopg2  python  queryset  questions  queue  quickref  range  reactjs  reference  remove  removing  resources  rolling-algorithms  rolling-windows  ruby  rust  s3  sample  scala  sdk  sequence  server_side_cursor  set  shell  sliding-windows  solution  speed  stackoverflow  stars:5  std  stdlib  stl  stopiteration  stream  streaming  streams  structure  syntax  template  tolearn  toread  totry  tounderstand  troubleshoot  tutorial  unity  utilities  utils  v8  value  video  virtual  w:4  webdev  while  wrap  yield 

Copy this bookmark:



description:


tags: